Shape measuring device, shape measuring method, and shape measuring program

ABSTRACT

The invention provide a shape measuring device, a shape measuring method, and a shape measuring program capable of clearly observing a surface state of a measuring object while measuring a shape of the measuring object at high accuracy. Light irradiated by a light projecting unit is reflected by a measuring object and received by a light receiving unit. Stereoscopic shape data of the measuring object is generated by a triangular distance measuring method. The light irradiated by the light projecting unit is reflected by the measuring object and received by the light receiving unit. All-focus texture image data of the measuring object is generated by synthesizing texture image data of a plurality of portions of the measuring object while changing a focus position of the light receiving unit. The stereoscopic shape data and the all-focus texture image data are synthesized to generate synthesized data.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims foreign priority based on Japanese PatentApplication No. 2012-199983, filed Sep. 11, 2012, the contents of whichis incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a shape measuring device, a shapemeasuring method, and a shape measuring program.

2. Description of Related Art

In the shape measuring device of a triangular distance measuring method,a surface of a measuring object is irradiated with light, and thereflected light is received by a light receiving element includingpixels arrayed one-dimensionally or two-dimensionally. The height of thesurface of the measuring object can be measured based on a peak positionof a light receiving amount distribution obtained by the light receivingelement. The shape of the measuring object thus can be measured.

In “Remote Sensing and Reconstruction for Three-Dimensional Objects andScenes” by Toni F. Schenk, Proceedings of SPIE, Volume 2572, pp. 1-9(1995), shape measurement of the triangular distance measuring methodcombining coded light and phase shift method is proposed. In“Videometrics and Optical Methods for 3D Shape Measurement” by Sabry F.El-Hakim and Armin Gruen, Proceedings of SPIE, Volume 4309, pp. 219-231(2001), shape measurement of the triangular distance measuring methodcombining coded light and stripe-form light is proposed. In suchmethods, the accuracy in the shape measurement of the measuring objectcan be enhanced.

In the shape measurements described in “Remote Sensing andReconstruction for Three-Dimensional Objects and Scenes” by Toni F.Schenk, Proceedings of SPIE, Volume 2572, pp. 1-9 (1995) and“Videometrics and Optical Methods for 3D Shape Measurement” by Sabry F.El-Hakim and Armin Gruen, Proceedings of SPIE, Volume 4309, pp. 219-231(2001), the shape of the measuring object can be measured at highaccuracy. However, the surface state that does not have a shape such aspatterns, hues, or the like provided on the surface of the measuringobject cannot be clearly observed.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a shape measuringdevice, a shape measuring method, and a shape measuring program capableof clearly observing a surface state of a measuring object whilemeasuring a shape of the measuring object at high accuracy.

(1) A shape measuring device according to one embodiment of theinvention includes a stage on which a measuring object is mounted; alight projecting unit configured to irradiate the measuring objectmounted on the stage with first light for shape measurement obliquelyfrom above and irradiate the measuring object mounted on the stage withsecond light for surface state imaging from above or obliquely fromabove; a light receiving unit arranged above the stage and configured toreceive the first light and the second light reflected by the measuringobject mounted on the stage and output a light receiving signalindicating a light receiving amount; a first data generating unitconfigured to generate first stereoscopic shape data indicating astereoscopic shape of the measuring object by a triangular distancemeasuring method based on the light receiving signal corresponding tothe first light output by the light receiving unit; a relative distancechanging unit for changing a focus position of the light receiving unitby changing a relative distance between the light receiving unit and thestage in an optical axis direction of the light receiving unit; a seconddata generating unit for generating a plurality of pieces of data basedon a plurality of light receiving signals corresponding to the secondlight output by the light receiving unit while changing the focusposition by the relative distance changing unit, and generating statedata indicating a surface state of the measuring object by extractingand synthesizing a plurality of data portions obtained while focusing oneach of a plurality of portions of the measuring object from theplurality of pieces of generated data; a synthesizing unit forgenerating synthesized data indicating an image in which thestereoscopic shape and the surface state of the measuring object aresynthesized by synthesizing the first stereoscopic shape data generatedby the first data generating unit and the state data generated by thesecond data generating unit; and a display section for displaying animage in which the stereoscopic shape and the surface state of themeasuring object are synthesized based on the synthesized data generatedby the synthesizing unit.

In such a shape measuring device, the measuring object mounted on thestage is irradiated with the first light for shape measurement obliquelyfrom above by the light projecting unit. The first light reflected bythe measuring object mounted on the stage is received by the lightreceiving unit at a position above the stage, and the light receivingsignal indicating the light receiving amount is output. The firststereoscopic shape data indicating the stereoscopic shape of themeasuring object is generated by the triangular distance measuringmethod based on the output light receiving signal corresponding to thefirst light.

The focus position of the light receiving unit is changed by changingthe relative distance between the light receiving unit and the stage inthe optical axis direction of the light receiving unit. The measuringobject mounted on the stage is irradiated with the second light forsurface state imaging from above or obliquely from above by the lightprojecting unit. The second light reflected by the measuring objectmounted on the stage is received by the light receiving unit at theposition above the stage, and the light receiving signal indicating thelight receiving amount is output. A plurality of pieces of data aregenerated based on the plurality of output light receiving signalscorresponding to the second light while changing the focus position. Aplurality of data portions obtained while focusing on each of aplurality of portions of the measuring object are extracted from theplurality of pieces of generated data and synthesized to generate thestate data indicating the surface state of the measuring object.

The generated first stereoscopic shape data and the generated state dataare synthesized to generate the synthesized data indicating an image inwhich the stereoscopic shape and the surface state of the measuringobject are synthesized. The image in which the stereoscopic shape andthe surface state of the measuring object are synthesized is displayedon the display section based on the generated synthesized data.

In this case, the first stereoscopic shape data indicates thestereoscopic shape of the measuring object measured at high accuracy bythe triangular distance measuring method. The state data is generated bysynthesizing the data indicating the surface state of the measuringobject when each portion of the measuring object is positioned withinthe range of the depth of field of the light receiving unit. The statedata thus clearly indicates the surface state of the entire surface ofthe measuring object. The synthesized state indicates the stereoscopicshape of the measuring object measured at high accuracy, and clearlyindicates the surface state of the measuring object. Therefore, thesurface state of the measuring object can be clearly observed whilemeasuring the shape of the measuring object at high accuracy bydisplaying on the display section the synthesized image based on thesynthesized data.

(2) The light projecting unit may include a first light projecting unitconfigured to irradiate the measuring object with the first light, and asecond light projecting unit configured to irradiate the measuringobject with the second light, the first light projecting unit mayinclude a measurement light source for emitting light, and a patterngenerating portion for generating the first light by converting thelight emitted from the measurement light source to light having apattern for shape measurement, the first light projecting unit beingarranged to emit the first light in a direction tilted by a first angle,which is greater than 0 degrees and smaller than 90 degrees with respectto an optical axis of the light receiving unit, and the second lightprojecting unit may be arranged to emit the second light having auniform light amount distribution in a direction parallel to the opticalaxis of the light receiving unit or in a direction tilted by a secondangle, which is smaller than the first angle, with respect to theoptical axis of the light receiving unit.

In this case, the first stereoscopic shape data can be easily generatedby the triangular distance measuring method by the first light emittedfrom the first light projecting unit. The second light projecting unitemits the second light in a direction parallel to the optical axis ofthe light receiving unit or in a direction tilted by the second angle,which is smaller than the first angle, with respect to the optical axisof the light receiving unit, and thus can irradiate the measuring objectwith the second light while suppressing formation of shades due toirregularities of the measuring object. Therefore, the state data thatindicates the surface state of the measuring object more clearly can begenerated. The surface state of the measuring object thus can be moreclearly observed.

(3) The light projecting unit may include a measurement light source foremitting light, and a pattern generating portion configured to generatethe first light by converting the light emitted from the measurementlight source to light having a pattern for shape measurement, and togenerate the second light by converting the light emitted from themeasurement light source to light having a uniform light amountdistribution.

In this case, the measuring object can be irradiated with the firstlight and the second light by a common light projecting unit. The shapemeasuring device thus can be miniaturized. Furthermore, themanufacturing cost of the shape measuring device can be reduced.

(4) The shape measuring device may further include an operation unit forindividually setting a first light amount condition defined by adjustingan intensity of the first light irradiated from the light projectingunit or an exposure time of the light receiving unit when receiving thefirst light reflected by the measuring object, and a second light amountcondition defined by adjusting an intensity of the second light or anexposure time of the light receiving unit when receiving the secondlight reflected by the measuring object, and for receiving aninstruction of the shape measurement from a user, wherein when receivingthe instruction of the shape measurement from the user by the operationunit, the first data generating unit may generate the first stereoscopicshape data of the measuring object based on the light receiving signaloutput by the light receiving unit when the measuring object isirradiated with the first light in the first light amount condition, andthe second data generating unit may generate the state data of themeasuring object based on the light receiving signal output by the lightreceiving unit when the measuring object is irradiated with the secondlight in the second light amount condition.

In this case, the first light amount condition suited for the generationof the first stereoscopic shape data and the second light amountcondition suited for the generation of the state data are individuallyset. The first stereoscopic shape data thus can be generated at higheraccuracy, and the state data that more clearly indicates the surfacestate of the entire surface of the measuring object can be generated. Asa result, the surface state of the measuring object can be more clearlyobserved while measuring the shape of the measuring object at higheraccuracy.

(5) The operation unit may be configured to be operable by the user toselect execution of any of first and second operation modes, and in thefirst operation mode, the second data generating unit may generate aplurality of pieces of data based on a plurality of light receivingsignals corresponding to the second light output by the light receivingunit with the focus position changed to a plurality of positions by therelative distance changing unit, and generate the state data byextracting and synthesizing a plurality of data portions obtained whilefocusing on each of a plurality of portions of the measuring object fromthe plurality of pieces of generated data, and in the second operationmode, the second data generating unit may generate single data based onthe light receiving signal corresponding to the second light output bythe light receiving unit with the focus position of the light receivingunit fixed, and generate the state data from the single data.

The first operation mode is suited for the shape measurement when thedifference in reflectivity or the difference in brightness depending onhue of the plurality of portions of the surface of the measuring objectis small, and the dimension of the measuring object in the optical axisdirection of the light receiving unit is greater than the depth of fieldof the light receiving unit. When carrying out the shape measurement ofsuch a measuring object, the user can generate the state data thatclearly indicates the surface state of the measuring object in a shorttime by selecting the first operation mode with the operation unit.

The second operation mode is suited for the shape measurement when thedimension of the measuring object is smaller than the depth of field ofthe light receiving unit. When carrying out the shape measurement ofsuch a measuring object, the user can generate the state data thatclearly indicates the surface state of the measuring object in a shortertime by selecting the second operation mode with the operation unit.

(6) The operation unit may be configured to be operable by the user toselect execution of a third operation mode, and in the third operationmode, the second data generating unit may generate a plurality of piecesof data based on a plurality of light receiving signals corresponding tothe second light output by the light receiving unit with the exposuretime of the light receiving unit or the intensity of the second lightchanged, synthesize the plurality of pieces of generated data so that adynamic range of the light receiving unit is enlarged, and generate thestate data from the synthesized data.

The third operation mode is suited for the shape measurement when thesurface of the measuring object includes a portion of high reflectivityand a portion of low reflectivity, or when the difference in brightnessdepending on hue is large. When carrying out the shape measurement ofsuch a measuring object, the user can generate the state data thatclearly indicates the surface state of the measuring object that doesnot include overexposure and underexposure by selecting the thirdoperation mode with the operation unit.

(7) The operation unit may be configured to be operable by the user toselect execution of a fourth operation mode, and in the fourth operationmode, the second data generating unit may generate a plurality of piecesof data based on a plurality of light receiving signals corresponding tothe second light output by the light receiving unit with the exposuretime of the light receiving unit or the intensity of the second lightchanged and the focus position changed to a plurality of positions bythe relative distance changing unit, synthesize the plurality of piecesof generated data so that the dynamic range of the light receiving unitis enlarged, and generate the state data by extracting and synthesizinga plurality of data portions obtained while focusing on each of aplurality of portions of the measuring object from the synthesized data.

The fourth operation mode is suited for the shape measurement when thesurface of the measuring object includes a portion of high reflectivityand a portion of low reflectivity or when the difference in brightnessdepending on hue is large, and the dimension of the measuring object isgreater than the depth of field of the light receiving unit. Whencarrying out the shape measurement of such a measuring object, the usercan generate the state data that clearly indicates the surface state ofthe measuring object by selecting the fourth operation mode with theoperation unit.

(8) The second data generating unit may generate second stereoscopicshape data indicating a stereoscopic shape of the measuring object basedon a relative distance between the light receiving unit and the stage bythe relative distance changing unit, and the shape measuring device mayfurther include a determination unit for determining, among theplurality of portions of the first stereoscopic shape data generated bythe first data generating unit, a portion where deviation from thesecond stereoscopic shape data generated by the second data generatingunit is greater than a predetermined threshold value.

In this case, the user can recognize, among the plurality of portions ofthe first stereoscopic shape data, the portion where the deviation fromthe second stereoscopic shape data is greater than the predeterminedthreshold value.

(9) The determination unit may display a stereoscopic image of themeasuring object on the display section so that the portion of the firststereoscopic shape data where the deviation from the second stereoscopicshape data is greater than the predetermined threshold value isidentified based on the first stereoscopic shape data generated by thefirst data generating unit.

In this case, the user can easily visually recognize, among theplurality of portions of the first stereoscopic shape data, the portionwhere the deviation from the second stereoscopic shape data is greaterthan the predetermined threshold value.

(10) The determination unit may interpolate, among the firststereoscopic shape data, the data of the portion where the deviationfrom the second stereoscopic shape data is greater than thepredetermined threshold value based on data of other portions.

In this case, among the plurality of portions of the first stereoscopicshape data, the reliability can be enhanced for the portion where thedeviation from the second stereoscopic shape data is greater than thepredetermined threshold value.

(11) The determination unit may interpolate, among the firststereoscopic shape data, the data of the portion where the deviationfrom the second stereoscopic shape data is greater than thepredetermined threshold value based on data of a corresponding portionof the second stereoscopic shape data.

In this case, among the plurality of portions of the first stereoscopicshape data, the reliability can be enhanced for the portion where thedeviation from the second stereoscopic shape data is greater than thepredetermined threshold value.

(12) The determination unit may determine a defective portion of thefirst stereoscopic shape data, and interpolate the defective portionbased on data of a corresponding portion of the second stereoscopicshape data.

In this case, the stereoscopic shape corresponding to the defectiveportion of the first stereoscopic shape data can be measured.Furthermore, the user can observe on the display section thestereoscopic shape of the measuring object that does not include thedefective portion in appearance.

(13) A shape measuring method according to another embodiment of theinvention includes the steps of irradiating a measuring object mountedon a stage with first light for shape measurement obliquely from aboveby a light projecting unit; receiving the first light reflected by themeasuring object mounted on the stage with a light receiving unit at aposition above the stage, and outputting a light receiving signalindicating a light receiving amount; generating first stereoscopic shapedata indicating a stereoscopic shape of the measuring object by atriangular distance measuring method based on the output light receivingsignal corresponding to the first light; changing a focus position ofthe light receiving unit by changing a relative distance between thelight receiving unit and the stage in an optical axis direction of thelight receiving unit; irradiating the measuring object mounted on thestage with second light for surface state imaging from above orobliquely from above by the light projecting unit; receiving the secondlight reflected by the measuring object mounted on the stage with thelight receiving unit at the position above the stage, and outputting alight receiving signal indicating the light receiving amount; generatinga plurality of pieces of data based on a plurality of output lightreceiving signals corresponding to the second light while changing thefocus position; generating state data indicating a surface state of themeasuring object by extracting and synthesizing a plurality of dataportions obtained while focusing on each of a plurality of portions ofthe measuring object from the plurality of pieces of generated data;generating synthesized data indicating an image in which thestereoscopic shape and the surface state of the measuring object aresynthesized by synthesizing the generated first stereoscopic shape dataand the generated state data; and displaying on a display section animage in which the stereoscopic shape and the surface state of themeasuring object are synthesized based on the generated synthesizeddata.

In this shape measuring method, the measuring object mounted on thestage is irradiated with the first light for shape measurement obliquelyfrom above by the light projecting unit. The first light reflected bythe measuring object mounted on the stage is received by the lightreceiving unit at the position above the stage, and the light receivingsignal indicating the light receiving amount is output. The firststereoscopic shape data indicating the stereoscopic shape of themeasuring object is generated by the triangular distance measuringmethod based on the output light receiving signal corresponding to thefirst light.

The focus position of the light receiving unit is changed by changingthe relative distance between the light receiving unit and the stage inthe optical axis direction of the light receiving unit. The measuringobject mounted on the stage is irradiated with the second light forsurface state imaging from above or obliquely from above by the lightprojecting unit. The second light reflected by the measuring objectmounted on the stage is received by the light receiving unit at theposition above the stage, and the light receiving signal indicating thelight receiving amount is output. A plurality of pieces of data aregenerated based on a plurality of output light receiving signalscorresponding to the second light while changing the focus position. Thestate data indicating a surface state of the measuring object isgenerated by extracting and synthesizing a plurality of data portionsobtained while focusing on each of a plurality of portions of themeasuring object from the plurality of pieces of generated data.

The synthesized data indicating an image in which the stereoscopic shapeand the surface state of the measuring object are synthesized isgenerated by synthesizing the generated first stereoscopic shape dataand the generated state data. The image in which the stereoscopic shapeand the surface state of the measuring object are synthesized isdisplayed on a display section based on the generated synthesized data.

In this case, the first stereoscopic shape data indicates thestereoscopic shape of the measuring object measured at high accuracy bythe triangular distance measuring method. The state data is generated bysynthesizing data indicating the surface state of the measuring objectwhen each portion of the measuring object is positioned within a rangeof the depth of field of the light receiving unit. The state data thusclearly indicates the surface state of the entire surface of themeasuring object. The synthesized data indicates the stereoscopic shapeof the measuring object measured at high accuracy and also clearlyindicates the surface state of the measuring object. Therefore, thesurface state of the measuring object can be clearly observed whilemeasuring the shape of the measuring object at high accuracy bydisplaying on the display section the synthesized image based on thesynthesized data.

(14) A shape measuring program according to still another embodiment ofthe invention is a shape measuring program executable by a processingdevice, the program causing the processing device to execute theprocessing of: irradiating a measuring object mounted on a stage withfirst light for shape measurement obliquely from above by a lightprojecting unit; receiving the first light reflected by the measuringobject mounted on the stage with a light receiving unit at a positionabove the stage, and outputting a light receiving signal indicating alight receiving amount; generating first stereoscopic shape dataindicating a stereoscopic shape of the measuring object by a triangulardistance measuring method based on the output light receiving signalcorresponding to the first light; changing a focus position of the lightreceiving unit by changing a relative distance between the lightreceiving unit and the stage in an optical axis direction of the lightreceiving unit; irradiating the measuring object mounted on the stagewith second light for surface state imaging from above or obliquely fromabove by the light projecting unit; receiving the second light reflectedby the measuring object mounted on the stage with the light receivingunit at the position above the stage, and outputting a light receivingsignal indicating the light receiving amount; generating a plurality ofpieces of data based on a plurality of output light receiving signalscorresponding to the second light while changing the focus position;generating state data indicating a surface state of the measuring objectby extracting and synthesizing a plurality of data portions obtainedwhile focusing on each of a plurality of portions of the measuringobject from the plurality of pieces of generated data; generatingsynthesized data indicating an image in which the stereoscopic shape andthe surface state of the measuring object are synthesized bysynthesizing the generated first stereoscopic shape data and thegenerated state data; and displaying on a display section an image inwhich the stereoscopic shape and the surface state of the measuringobject are synthesized based on the generated synthesized data.

In this shape measuring program, the measuring object mounted on thestage is irradiated with the first light for shape measurement obliquelyfrom above by the light projecting unit. The first light reflected bythe measuring object mounted on the stage is received by the lightreceiving unit at the position above the stage, and the light receivingsignal indicating the light receiving amount is output. The firststereoscopic shape data indicating the stereoscopic shape of themeasuring object is generated by the triangular distance measuringmethod based on the output light receiving signal corresponding to thefirst light.

The focus position of the light receiving unit is changed by changingthe relative distance between the light receiving unit and the stage inthe optical axis direction of the light receiving unit. The measuringobject mounted on the stage is irradiated with the second light forsurface state imaging from above or obliquely from above by the lightprojecting unit. The second light reflected by the measuring objectmounted on the stage is received by the light receiving unit at theposition above the stage, and the light receiving signal indicating thelight receiving amount is output. A plurality of pieces of data aregenerated based on a plurality of output light receiving signalscorresponding to the second light while changing the focus position. Thestate data indicating a surface state of the measuring object isgenerated by extracting and synthesizing a plurality of data portionsobtained while focusing on each of a plurality of portions of themeasuring object from the plurality of pieces of generated data.

The synthesized data indicating an image in which the stereoscopic shapeand the surface state of the measuring object are synthesized isgenerated by synthesizing the generated first stereoscopic shape dataand the generated state data. The image in which the stereoscopic shapeand the surface state of the measuring object are synthesized isdisplayed on a display section based on the generated synthesized data.

In this case, the first stereoscopic shape data indicates thestereoscopic shape of the measuring object measured at high accuracy bythe triangular distance measuring method. The state data is generated bysynthesizing data indicating the surface state of the measuring objectwhen each portion of the measuring object is positioned within a rangeof the depth of field of the light receiving unit. The state data thusclearly indicates the surface state of the entire surface of themeasuring object. The synthesized data indicates the stereoscopic shapeof the measuring object measured at high accuracy and also clearlyindicates the surface state of the measuring object. Therefore, thesurface state of the measuring object can be clearly observed whilemeasuring the shape of the measuring object at high accuracy bydisplaying the synthesized image based on the synthesized data on thedisplay section.

According to the present invention, the surface state of the measuringobject can be clearly observed while measuring the shape of themeasuring object at high accuracy.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a configuration of a shape measuringdevice according to one embodiment of the present invention;

FIG. 2 is a schematic view showing a configuration of a measuringsection of the shape measuring device of FIG. 1;

FIGS. 3A to 3D are schematic views of a measuring object in a stateirradiated with light;

FIGS. 4A to 4D are schematic views of the measuring object in a stateirradiated with light;

FIG. 5 is a view showing an example of a GUI for displaying images indual-screen;

FIG. 6 is a view describing the principle of a triangular distancemeasuring method;

FIGS. 7A and 7B are views describing a first pattern of measurementlight;

FIGS. 8A to 8D are views describing a second pattern of the measurementlight;

FIGS. 9A to 9C are views describing a third pattern of the measurementlight;

FIG. 10 is a diagram showing a relationship between the timing (order)at which an image of a specific portion of the measuring object isphotographed and the intensity of the received light;

FIGS. 11A to 11D are diagrams describing a fourth pattern of themeasurement light;

FIG. 12 is a view showing an example of the GUI of a display section atthe time of selecting an operation mode;

FIG. 13 is a view showing an example of the GUI of the display sectionat the time of selecting an operation mode;

FIG. 14 is a view showing an example of the GUI of the display sectionafter the execution of the shape measurement processing;

FIG. 15 is a schematic side view of the measuring object for describingan all-focus texture image;

FIGS. 16A to 16F are views showing a relationship between a focusposition of a light receiving unit and the definition of a textureimage;

FIG. 17 shows an all-focus texture image of the measuring object basedon the generated all-focus texture image data;

FIGS. 18A and 18B show synthesized images of the measuring object basedon the synthesized data;

FIG. 19 is a view showing an example of the GUI of the display sectionat the time of selecting the type of texture image;

FIGS. 20A and 20B are views describing correction of main stereoscopicshape data by sub-stereoscopic shape data;

FIGS. 21A and 21B are views describing correction of the mainstereoscopic shape data by the sub-stereoscopic shape data;

FIGS. 22A and 22B are views describing correction of the mainstereoscopic shape data by the sub-stereoscopic shape data;

FIG. 23 is a flowchart showing a procedure for preparation of the shapemeasurement;

FIG. 24 is a flowchart showing details of first adjustment in theprocedure for the preparation of the shape measurement;

FIG. 25 is a flowchart showing details of the first adjustment in theprocedure for the preparation of the shape measurement;

FIG. 26 is a schematic view showing the light receiving unit of FIG. 2seen from the X direction;

FIG. 27 is a flowchart showing details of second adjustment in theprocedure for the preparation of the shape measurement;

FIG. 28 is a flowchart showing details of the second adjustment in theprocedure for the preparation of the shape measurement;

FIG. 29 is a view showing an example of the GUI of the display sectionat the time of executing the second adjustment;

FIG. 30 is a flowchart showing the procedure for the shape measurementprocessing;

FIG. 31 is a flowchart showing the procedure for the shape measurementprocessing;

FIG. 32 is a flowchart showing the procedure for the shape measurementprocessing;

FIGS. 33A to 33D are views describing a first example of a firstauxiliary function of focus adjustment;

FIGS. 34A and 34B are views describing the first example of the firstauxiliary function of the focus adjustment;

FIGS. 35A to 35D are views describing a second example of the firstauxiliary function of the focus adjustment;

FIGS. 36A and 36B are views showing an example of the GUI for specifyinga position to display an auxiliary pattern;

FIGS. 37A to 37D are views describing a third example of the firstauxiliary function of the focus adjustment;

FIGS. 38A to 38D are views describing a fourth example of the firstauxiliary function of the focus adjustment;

FIGS. 39A to 39D are views describing a fifth example of the firstauxiliary function of the focus adjustment;

FIGS. 40A and 40B are views describing the fifth example of the firstauxiliary function of the focus adjustment;

FIGS. 41A and 41B are views showing an example in which the measuringobject is irradiated with light having a frame pattern from ameasurement light source;

FIGS. 42A and 42B are views showing an example in which the measuringobject is irradiated with the light having the frame pattern from themeasurement light source;

FIG. 43 is a view showing a frame pattern corresponding to a digitalzoom function;

FIGS. 44A to 44E are views showing examples of the shapes of theauxiliary pattern and a guide pattern;

FIGS. 45A to 45E are views showing other examples of the shapes of theauxiliary pattern and the guide pattern;

FIGS. 46A to 46C are views showing further examples of the shapes of theauxiliary pattern and the guide pattern;

FIGS. 47A to 47C are views showing the measuring object displayed on thedisplay section when the measuring object is not irradiated withillumination light;

FIGS. 48A to 48C are views showing the measuring object displayed on thedisplay section when the measuring object is irradiated with theillumination light;

FIGS. 49A and 49B are views describing a first example of a secondauxiliary function of the focus adjustment;

FIGS. 50A and 50B are views describing a second example of the secondauxiliary function of the focus adjustment;

FIG. 51 is a view describing the second example of the second auxiliaryfunction of the focus adjustment;

FIGS. 52A and 52B are views describing a third example of the secondauxiliary function of the focus adjustment;

FIGS. 53A to 53D are views describing the third example of the secondauxiliary function of the focus adjustment;

FIG. 54 is a view describing a first method of increasing a speed ofcalculation of height;

FIG. 55 is a view describing a second method of increasing the speed ofcalculation of height;

FIG. 56 is a view describing a third method of increasing the speed ofcalculation of height;

FIGS. 57A to 57C are views showing an example of a height displayfunction;

FIGS. 58A and 58B are views describing measurement of a profile of themeasuring object;

FIGS. 59A and 59B are views describing the measurement of a profile ofthe measuring object;

FIGS. 60A to 60C are views showing a measurement procedure of theprofile of the measuring object;

FIGS. 61A to 61C are views showing a measurement procedure of theprofile of the measuring object;

FIGS. 62A to 62D are views describing adjustment of a posture of themeasuring object;

FIGS. 63A and 63B are views describing a first example of a firstauxiliary function of a posture adjustment;

FIGS. 64A and 64B are views describing the first example of the firstauxiliary function of the posture adjustment;

FIG. 65 is a view describing a second example of the first auxiliaryfunction of the posture adjustment;

FIG. 66 is a view showing an example of the GUI for displaying theimages in dual screen;

FIG. 67 is a view showing the measuring object irradiated with lighthaving a uniform pattern as adjustment light;

FIG. 68 is a view showing an image of the measuring object including anestimation result of a measurement difficulty region;

FIGS. 69A and 69B are views showing change in the measurement difficultyregion when the measuring object is irradiated with the adjustment lightfrom one light projecting unit;

FIGS. 70A and 70B are views showing change in the measurement difficultyregion when the measuring object is irradiated with the adjustment lightfrom the one light projecting unit;

FIGS. 71A and 71B are views showing change in the measurement difficultyregion when the measuring object is irradiated with the adjustment lightfrom the one light projecting unit;

FIGS. 72A and 72B are views showing change in the measurement difficultyregion when the measuring objects of FIGS. 69A to 71B are irradiatedwith the adjustment light from both light projecting units;

FIGS. 73A and 73B are views showing change in the measurement difficultyregion when the measuring objects of FIGS. 69A to 71B are irradiatedwith the adjustment light from both light projecting units;

FIGS. 74A and 74B are views showing change in the measurement difficultyregion when the measuring objects of FIGS. 69A to 71B are irradiatedwith the adjustment light from both light projecting units;

FIG. 75 is a flowchart showing the procedure for the posture adjustmentbased on the first auxiliary function of the posture adjustment;

FIG. 76 is a flowchart showing the procedure for the posture adjustmentbased on the first auxiliary function of the posture adjustment;

FIGS. 77A and 77B are views each showing an example of display of thedisplay section in which an ROI is set;

FIGS. 78A and 78B are views each showing an example of an image of themeasuring object including the measurement difficulty region;

FIGS. 79A and 79B are views each showing another example of the image ofthe measuring object including the measurement difficulty region;

FIGS. 80A and 80B are views each showing still another example of theimage of the measuring object including the measurement difficultyregion;

FIGS. 81A and 81B are views each showing yet another example of theimage of the measuring object including the measurement difficultyregion;

FIG. 82 is a flowchart showing the procedure for the posture adjustmentbased on a second auxiliary function of the posture adjustment;

FIG. 83 is a flowchart showing the procedure for the posture adjustmentbased on the second auxiliary function of the posture adjustment; and

FIG. 84 is a flowchart showing the procedure for the posture adjustmentbased on a third auxiliary function of the posture adjustment.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

[1] Configuration of Shape Measuring Device

FIG. 1 is a block diagram showing a configuration of a shape measuringdevice according to one embodiment of the present invention. FIG. 2 is aschematic view showing a configuration of a measuring section of a shapemeasuring device 500 of FIG. 1. Hereinafter, the shape measuring device500 according to the present embodiment will be described with referenceto FIGS. 1 and 2. As shown in FIG. 1, the shape measuring device 500includes a measuring section 100, a PC (Personal Computer) 200, acontrol section 300, and a display section 400.

As shown in FIG. 1, the measuring section 100 is, for example, amicroscope, and includes a light projecting unit 110, a light receivingunit 120, an illumination light output unit 130, a stage 140, and acontrol board 150. The light projecting unit 110 includes a measurementlight source 111, a pattern generating portion 112, and a plurality oflenses 113, 114, 115. The light receiving unit 120 includes a camera121, and a plurality of lenses 122, 123. A measuring object S is mountedon the stage 140.

The light projecting unit 110 is arranged obliquely above the stage 140.The measuring section 100 may include a plurality of light projectingunits 110. In the example of FIG. 2, the measuring section 100 includestwo light projecting units 110. Hereinafter, when distinguishing the twolight projecting units 110, one light projecting unit 110 is referred toas a light projecting unit 110A, and the other light projecting unit 110is referred to as a light projecting unit 110B. The light projectingunits 110A, 110B are symmetrically arranged with an optical axis of thelight receiving unit 120 therebetween.

The measurement light source 111 of each light projecting unit 110A,110B is, for example, a halogen lamp that emits white light. Themeasurement light source 111 may also be other light sources such as awhite LED (Light Emitting Diode) that emits white light. The light(hereinafter referred to as measurement light) emitted from themeasurement light source 111 is appropriately collected by the lens 113,and then enters the pattern generating portion 112.

The pattern generating portion 112 is, for example, a DMD (DigitalMicro-mirror Device). The pattern generating portion 112 may also be anLCD (Liquid Crystal Display), an LCOS (Liquid Crystal on Silicon:reflective liquid crystal element), or a mask. The measurement lightthat entered the pattern generating portion 112 is converted to apattern set in advance and an intensity (brightness) set in advance, andis then emitted. The measurement light emitted from the patterngenerating portion 112 is converted to light having a diameter largerthan the dimension of the measuring object S by the plurality of lenses114, 115, and then applied on the measuring object S on the stage 140.

The light receiving unit 120 is arranged above the stage 140. Themeasurement light reflected by the measuring object S toward a positionabove the stage 140 is collected and imaged by the plurality of lenses122, 123 of the light receiving unit 120, and then received by thecamera 121.

The camera 121 is, for example, a CCD (Charge Coupled Device) includingan imaging element 121 a and a lens. The imaging element 121 a is, forexample, a monochrome CCD (Charge Coupled Device). The imaging element121 a may also be other imaging elements such as a CMOS (ComplementaryMetal Oxide Semiconductor) image sensor, and the like. An analogelectric signal (hereinafter referred to as light receiving signal)corresponding to the light receiving amount is output from each pixel ofthe imaging element 121 a to the control board 150.

As opposed to the color CCD, the monochrome CCD is not required toinclude pixels for receiving light of red wavelength, pixels forreceiving light of green wavelength, and pixels for receiving light ofblue wavelength. The resolution in the measurement of the monochrome CCDthus becomes higher than the resolution of the color CCD. Furthermore,the monochrome CCD is not required to include a color filter for eachpixel, as opposed to the color CCD. The sensitivity of the monochromeCCD thus becomes higher than the sensitivity of the color CCD. For thesereasons, the monochrome CCD is arranged in the camera 121 in thisexample.

In this example, the illumination light output unit 130 emits the lightof red wavelength, the light of green wavelength, and the light of bluewavelength in a time division manner on the measuring object S.According to such a configuration, a color image of the measuring objectS can be captured by the light receiving unit 120 using the monochromeCCD.

If the color CCD has sufficient resolution and sensitivity, the imagingelement 121 a may be a color CCD. In this case, the illumination lightoutput unit 130 is not required to irradiate the light of redwavelength, the light of green wavelength, and the light of bluewavelength in a time division manner on the measuring object S, andirradiates white light on the measuring object S. The configuration ofthe illumination light source 320 thus can be simplified.

The control board 150 is mounted with an A/D converter (Analog/DigitalConverter) and a FIFO (First In First Out) memory (not shown). The lightreceiving signal output from the camera 121 is sampled at a constantsampling period and converted to a digital signal by the A/D converterof the control board 150 based on control by the control section 300.The digital signal output from the A/D converter is sequentiallyaccumulated in the FIFO memory. The digital signals accumulated in theFIFO memory are sequentially transferred to the PC 200 as pixel data.

As shown in FIG. 1, the PC 200 includes a CPU (Central Processing Unit)210, a ROM (Read Only Memory) 220, a working memory 230, a storagedevice 240, and an operation unit 250. The operation unit 250 includes akeyboard and a pointing device. A mouse, a joy stick, or the like can beused for the pointing device.

The ROM 220 stores a system program. The working memory 230 includes aRAM (Random Access Memory), and is used for processing of various typesof data. The storage device 240 includes a hard disc, and the like. Thestorage device 240 stores an image processing program and a shapemeasuring program. The storage device 240 is used to save various typesof data such as pixel data provided from the control board 150.

The CPU 210 generates image data based on the pixel data provided fromthe control board 150. The CPU 210 also performs various types ofprocessing on the generated image data using the working memory 230 anddisplays an image based on the image data on the display section 400.Furthermore, the CPU 210 applies a drive pulse to a stage drive unit146, to be described later. The display section 400 is configured by,for example, an LCD panel or an organic EL (Electro-Luminescence) panel.

In FIG. 2, two directions orthogonal to each other in a plane(hereinafter referred to as mounting surface) of the stage 140 on whichthe measuring object S is mounted are defined as X direction and Ydirection, and are indicated with arrows X, Y, respectively. A directionorthogonal to the mounting surface of the stage 140 is defined as Zdirection, and is indicated with an arrow Z. A direction of rotatingwith an axis parallel to the Z direction as a center is defined as θdirection, and is indicated with an arrow θ.

The stage 140 includes an X-Y stage 141, a Z stage 142, a θ stage 143,and a tilt stage 144. The X-Y stage 141 includes an X-direction movementmechanism and a Y-direction movement mechanism. The Z stage 142 includesa Z-direction movement mechanism. The θ stage 143 includes a θ-directionrotation mechanism. The tilt stage 144 includes a mechanism (hereinafterreferred to as tilt rotation mechanism) capable of rotating with theaxis parallel to the mounting surface as the center. The X-Y stage 141,the Z stage 142, the θ stage 143 and the tilt stage 144 configure thestage 140. The stage 140 also includes a fixing member (clamp) (notshown) for fixing the measuring object S to the mounting surface.

A plane that is positioned at a focus of the light receiving unit 120and that is perpendicular to the optical axis of the light receivingunit 120 is referred to as a focal plane of the light receiving unit120. As shown in FIG. 2, the relative positional relationship among thelight projecting units 110A, 110B, the light receiving unit 120, and thestage 140 is set such that the optical axis of the light projecting unit110A, the optical axis of the light projecting unit 110B, and theoptical axis of the light receiving unit 120 intersect each other at thefocal plane of the light receiving unit 120.

A plane that is positioned at the focus of the light projecting unit 110(point where the pattern of the measurement light is imaged) and that isperpendicular to the optical axis of the light projecting unit 110 isreferred to as a focal plane of the light projecting unit 110. Each ofthe light projecting unit 110A, 110B is configured such that the focalplane of the light projecting unit 110A and the focal plane of the lightprojecting unit 110B intersect at a position including the focus of thelight receiving unit 120.

The center of a rotation axis in the θ direction of the θ stage 143coincides with the optical axis of the light receiving unit 120. Thus,when the θ stage 143 is rotated in the θ direction, the measuring objectS can be rotated within the visual field with the rotation axis as thecenter without moving out from the visual field. The X-Y stage 141, theθ stage 143, and the tilt stage 144 are supported by the Z stage 142.

In other words, even in a state where the θ stage 143 is rotated in theθ direction or the tilt stage 144 is rotated in the tilt direction, thecenter axis of the light receiving unit 120 and a movement axis of the Zstage 142 do not shift from each other. The tilt direction is therotation direction having an axis parallel to the mounting surface asthe center. According to such a configuration, even in a state where theposition or the posture of the measuring object S is changed, the stage140 can be moved in the Z direction and a plurality of images capturedat each of a plurality of different focus positions of the lightreceiving unit 120 can be synthesized.

A stepping motor is used for the X-direction movement mechanism, theY-direction movement mechanism, the Z-direction movement mechanism, theθ-direction rotation mechanism, and the tilt rotation mechanism of thestage 140. The X-direction movement mechanism, the Y-direction movementmechanism, the Z-direction movement mechanism, the θ-direction rotationmechanism, and the tilt rotation mechanism of the stage 140 are drivenby a stage operation unit 145 or the stage drive unit 146 of FIG. 1.

The user can move the mounting surface of the stage 140 in the Xdirection, the Y direction, or the Z direction or rotate the same in theθ direction or the tilt direction relatively with respect to the lightreceiving unit 120 by manually operating the stage operation unit 145.The stage drive unit 146 supplies current to the stepping motors of thestage 140 based on the drive pulse provided by the PC 200 to move thestage 140 in the X direction, the Y direction or the Z direction, orrotate the same in the θ direction or the tilt direction relatively withrespect to the light receiving unit 120.

In the present embodiment, the stage 140 is an electrical stage that canbe driven by the stepping motor and that can be manually operated, butthe present invention is not limited thereto. The stage 140 may be anelectrical stage that can be driven only with the stepping motor, or maybe a manual stage that can be operated only by manual operation.

The control section 300 includes a control board 310 and an illuminationlight source 320. A CPU (not shown) is mounted on the control board 310.The CPU of the control board 310 controls the light projecting unit 110,the light receiving unit 120, and the control board 150 based on acommand from the CPU 210 of the PC 200.

The illumination light source 320 includes three LEDs that emit redlight, green light, and blue light, for example. The light of anarbitrary color can be generated from the illumination light source 320by controlling the luminance of the light emitted from each LED. Thelight (hereinafter referred to as illumination light) generated from theillumination light source 320 is output from the illumination lightoutput unit 130 of the measuring section 100 through a light guidingmember (light guide). The illumination light source 320 may be arrangedin the measuring section 100 without arranging the illumination lightsource 320 in the control section 300. In this case, the illuminationlight output unit 130 is not arranged in the measuring section 100.

The illumination light output unit 130 of FIG. 2 has a circular ringshape, and is arranged above the stage 140 so as to surround the lightreceiving unit 120. The measuring object S is thereby irradiated withthe illumination light from the illumination light output unit 130 sothat shade is not formed. FIGS. 3A to 3D and FIGS. 4A to 4D areschematic views of the measuring object S in a state irradiated withlight. In the example of FIGS. 3A to 3D and FIGS. 4A to 4D, themeasuring object S has a hole Sh at substantially the middle of theupper surface. In FIGS. 3A, 3C, and 4A, shade Ss is shown by hatching.

FIG. 3A is a plan view of the measuring object S in a state irradiatedwith the measurement light from one light projecting unit 110A of FIG.2, and FIG. 3B is a cross-sectional view taken along line A-A of FIG.3A. As shown in FIGS. 3A and 3B, when the measuring object S isirradiated with the measurement light from the one light projecting unit110A, the measurement light may not reach the bottom of the hole Shdepending on the depth of the hole Sh thus forming the shade Ss.Therefore, a part of the measuring object S cannot be observed.

FIG. 3C is a plan view of the measuring object S in a state irradiatedwith the measurement light from the other light projecting unit 110B ofFIG. 2, and FIG. 3D is a cross-sectional view taken along line B-B ofFIG. 3C. As shown in FIGS. 3C and 3D, when the measuring object S isirradiated with the measurement light from the other light projectingunit 110B, the measurement light may not reach the bottom of the hole Shdepending on the depth of the hole Sh, thus forming the shade Ss.Therefore, a part of the measuring object S cannot be observed.

FIG. 4A is plan view of the measuring object S in a state irradiatedwith the measurement light from both light projecting units 110A, 110B,and FIG. 4B is a cross-sectional view taken along line C-C of FIG. 4A.As shown in FIGS. 4A and 4B, when the measuring object S is irradiatedwith the measurement light from both light projecting units 110A, 110B,the measurement light that does not reach the bottom of the hole Sh isreduced as compared to the case where the measuring object S isirradiated with the measurement light from one of the light projectingunits 110A, 110B. Hence, the shade Ss that is formed is also reduced.Therefore, the portion of the measuring object S that can be observedincreases.

FIG. 4C is plan view of the measuring object S in a state irradiatedwith the illumination light from the illumination light output unit 130of FIG. 2, and FIG. 4D is a cross-sectional view taken along line D-D ofFIG. 4C. As shown in FIGS. 4C and 4D, since the illumination light isapplied from substantially immediately above the measuring object S, theillumination light reaches the bottom of the hole Sh regardless of thedepth of the hole Sh. Therefore, the majority of the measuring object Scan be observed.

The image of the measuring object S irradiated with the measurementlight from the one light projecting unit 110A and the image of themeasuring object S irradiated with the measurement light from the otherlight projecting unit 110B may be displayed on the display section 400so as to be side by side (dual display). FIG. 5 is a view showing anexample of a GUI (Graphical User Interface) for displaying the images indual screen.

As shown in FIG. 5, the display section 400 includes two image displayregions 410, 420 arranged side by side. When displaying the images indual screen, the measuring object S is alternately irradiated with themeasurement light from the light projecting units 110A, 110B in aswitching manner. In the image display region 410, the image of themeasuring object S when irradiated with the measurement light from theone light projecting unit 110A is displayed. In the image display region420, the image of the measuring object S when irradiated with themeasurement light from the other light projecting unit 110B isdisplayed. The user thus can recognize, in a distinguished manner, theimages of the measuring object S when irradiated with the measurementlight from the respective light projecting units 110A, 110B.

In this example, the frequency of switching the measurement light fromthe light projecting units 110A, 110B is, for example, a few Hz. Thefrequency of switching the measurement light from the light projectingunits 110A, 110B may be set to such a value (e.g., 100 Hz) that the usercannot recognize the switching. In this case, the measuring object S isobserved by the user as if it is simultaneously irradiated with themeasurement light from both light projecting units 110A, 110B in themeasuring section 100.

Two light amount setting bars 430, 440 are displayed on the displaysection 400. The light amount setting bar 430 includes a slider 430 sthat can be moved in the horizontal direction. The light amount settingbar 440 includes a slider 440 s that can be moved in the horizontaldirection. Hereinafter, the measurement light emitted from one lightprojecting unit 110A is referred to as one measurement light, and themeasurement light emitted from the other light projecting unit 110B isreferred to as other measurement light. The position of the slider 430 son the light amount setting bar 430 corresponds to the light amount(hereinafter referred to as light amount of one measurement light) ofthe light receiving unit 120 when receiving the one measurement light.The position of the slider 440 s on the light amount setting bar 440corresponds to the light amount (hereinafter referred to as light amountof other measurement light) of the light receiving unit 120 whenreceiving the other measurement light.

The user can change the light amount of the one measurement light byoperating the operation unit 250 of the PC 200 of FIG. 1 and moving theslider 430 s of the light amount setting bar 430 in the horizontaldirection. The light amount of the one measurement light is changed bychanging the brightness of the one measurement light or the exposuretime of the light receiving unit 120 when receiving the one measurementlight. Similarly, the user can change the light amount of the othermeasurement light by operating the operation unit 250 and moving theslider 440 s of the light amount setting bar 440 in the horizontaldirection. The light amount of the other measurement light is changed bychanging the brightness of the other measurement light or the exposuretime of the light receiving unit 120 when receiving the othermeasurement light.

As described above, the images of the measuring object S when irradiatedwith the measurement light by the light projecting units 110A, 110B,respectively, are displayed side by side in the image display regions410, 420. Therefore, the user can appropriately adjust the light amountsof the one measurement light and the other measurement light by movingthe positions of the sliders 430 s, 440 s of the light amount settingbars 430, 440 while viewing the images of the measuring object Sdisplayed in the image display regions 410, 420.

There may be a correlation between the light amounts of the onemeasurement light and the other measurement light, and the light amount(hereinafter referred to as light amount of illumination light) of thelight receiving unit 120 when receiving the illumination light emittedfrom the illumination light output unit 130. In this case, the lightamounts of the one measurement light and the other measurement light maybe automatically adjusted based on the light amount of the illuminationlight. Alternatively, an adjustment guide for making the light amountsof the one measurement light and the other measurement light appropriatebased on the light amount of the illumination light may be displayed onthe display section 400. In this case, the user can appropriately adjustthe light amounts of the one measurement light and the other measurementlight by moving the positions of the sliders 430 s, 440 s of the lightamount setting bars 430, 440 based on the adjustment guide.

If the irradiating direction of the light differs, the reflectingdirection of the light also differs. Thus, the brightness of the imageof the portion irradiated with one measurement light and the brightnessof the image of the portion irradiated with the other measurement lightdiffer from each other even concerning the same portion of the measuringobject S. In other words, the light amount suited for shape measurementdiffers depending on the irradiating direction.

In the present embodiment, the respective brightness of the images whenthe measurement light is irradiated from the light projecting units110A, 110B can be individually adjusted. Thus, the appropriate lightamount corresponding to the irradiating direction of the light can beset. The image during the adjustment of the light amount is displayedwhile being updated in the image display regions 410, 420. The user thuscan adjust the light amount while checking the image.

In this case, the PC 200 can display, in the image display regions 410,420, the portion where overexposure occurs due to excessive brightnessor the portion where underexposure occurs due to excessive darkness inthe image in an identifiable manner. The user thus can easily checkwhether or not the light amount is being appropriately adjusted.

[2] Shape Measurement of Measuring Object

(1) Shape Measurement by Triangular Distance Measuring Method

In the measuring section 100, the shape of the measuring object S ismeasured by the triangular distance measuring method. FIG. 6 is a viewdescribing the principle of triangular distance measuring method. Asshown in FIG. 6, an angle α between the optical axis of the measurementlight emitted from the light projecting unit 110 and the optical axis ofthe measurement light entering the light receiving unit 120 (opticalaxis of light receiving unit 120) is set in advance. The angle α isgreater than 0 degrees and smaller than 90 degrees.

If the measuring object S is not mounted on the stage 140, themeasurement light emitted from the light projecting unit 110 isreflected at point O of the mounting surface of the stage 140 and entersthe light receiving unit 120. If the measuring object S is mounted onthe stage 140, the measurement light emitted from the light projectingunit 110 is reflected at point A on the surface of the measuring objectS and enters the light receiving unit 120.

Assuming the distance in the X direction between point O and point A isd, a height h of point A of the measuring object S with respect to themounting surface of the stage 140 is obtained by h=d/tan(α). The CPU 210of the PC 200 of FIG. 1 measures the distance d between point O andpoint A in the X direction based on the pixel data of the measuringobject S provided by the control board 150. The CPU 210 also calculatesthe height h of point A at the surface of the measuring object S basedon the measured distance d. The three-dimensional shape of the measuringobject S is measured by calculating the heights of all the points on thesurface of the measuring object S.

The measurement light having various patterns is emitted from the lightprojecting unit 110 of FIG. 1 so that all the points on the surface ofthe measuring object S are irradiated with the measurement light. Thepatterns of the measurement light are controlled by the patterngenerating portion 112 of FIG. 1. The patterns of the measurement lightwill be described below.

(2) First Pattern of Measurement Light

FIGS. 7A and 7B are views describing a first pattern of the measurementlight. FIG. 7A shows a state in which the measuring object S on thestage 140 is irradiated with the measurement light from the lightprojecting unit 110. FIG. 7B shows a plan view of the measuring object Sirradiated with the measurement light. As shown in FIG. 7A, in the firstpattern, the measurement light (hereinafter referred to as linearmeasurement light) having a linear cross-section parallel to the Ydirection is emitted from the light projecting unit 110. In this case,as shown in FIG. 7B, the portion of the linear measurement light, withwhich the stage 140 is irradiated, and the portion of the linearmeasurement light, with which the surface of the measuring object S isirradiated, are shifted from each other in the X direction by thedistance d corresponding to the height h of the surface of the measuringobject S. Therefore, the height h of the measuring object S can becalculated by measuring the distance d.

If a plurality of portions along the Y direction at the surface of themeasuring object S has different heights, the distance d is measured foreach portion so that the heights h for the plurality of portions alongthe Y direction can be calculated.

The CPU 210 of FIG. 1 measures the distance d for the plurality ofportions along the Y direction at one position in the X direction, andthen measures the distance for the plurality of portions along the Ydirection at another position in the X direction by scanning the linearmeasurement light parallel to the Y direction in the X direction. Theheights h of the plurality of portions of the measuring object S alongthe Y direction at a plurality of positions in the X direction thus canbe calculated. The heights h of all the points on the surface of themeasuring object S can be calculated by scanning the linear measurementlight in the X direction in a range wider than the X direction dimensionof the measuring object S. The three-dimensional shape of the measuringobject S is thereby measured.

(3) Second Pattern of Measurement Light

FIGS. 8A to 8D are views describing a second pattern of the measurementlight. As shown in FIGS. 8A to 8D, in the second pattern, themeasurement light (hereinafter referred to as sinusoidal measurementlight) having a linear cross-section parallel to the Y direction andhaving a pattern in which the intensity changes sinusoidally in the Xdirection is emitted from the light projecting unit 110 for a pluralityof times (four times in this example).

FIG. 8A shows the sinusoidal measurement light emitted the first time.The intensity of the sinusoidal measurement light emitted the first timehas an initial phase φ at an arbitrary portion P0 on the surface of themeasuring object S. When such sinusoidal measurement light is emitted,the light reflected by the surface of the measuring object S is receivedby the light receiving unit 120. The intensity of the received light ismeasured based on the pixel data of the measuring object S. Theintensity of light reflected by the portion P0 on the surface of themeasuring object S is assumed as I1.

FIG. 8B shows the sinusoidal measurement light emitted the second time.The intensity of the sinusoidal measurement light emitted the secondtime has a phase (φ+π/2) at the portion P0 on the surface of themeasuring object S. When such sinusoidal measurement light is emitted,the light reflected by the surface of the measuring object S is receivedby the light receiving unit 120. The intensity of the received light ismeasured based on the pixel data of the measuring object. S. Theintensity of light reflected by the portion P0 on the surface of themeasuring object S is assumed as I2.

FIG. 8C shows the sinusoidal measurement light emitted the third time.The intensity of the sinusoidal measurement light emitted the third timehas a phase (φ+π) at the portion P0 on the surface of the measuringobject S. When such sinusoidal measurement light is emitted, the lightreflected by the surface of the measuring object S is received by thelight receiving unit 120. The intensity of the received light ismeasured based on the pixel data of the measuring object S. Theintensity of light reflected by the portion P0 on the surface of themeasuring object S is assumed as I3.

FIG. 8D shows the sinusoidal measurement light emitted the fourth time.The intensity of the sinusoidal measurement light emitted the fourthtime has a phase (φ+3π/2) at the portion P0 on the surface of themeasuring object S. When such sinusoidal measurement light is emitted,the light reflected by the surface of the measuring object S is receivedby the light receiving unit 120. The intensity of the received light ismeasured based on the pixel data of the measuring object S. Theintensity of light reflected by the portion P0 on the surface of themeasuring object S is assumed as I4.

The initial phase φ is given by φ=tan⁻¹[(I1−I3)/(I2−I4)]. The height hof the arbitrary portion of the measuring object S is calculated fromthe initial phase φ. According to this method, the initial phase φ ofall the portions of the measuring object S can be calculated easily andat high speed by measuring the intensity of light for four times. Theinitial phase φ can be calculated by emitting the measurement lighthaving different phases at least three times, and measuring theintensity of the received light. The three-dimensional shape of themeasuring object S can be measured by calculating the height h of allthe portions on the surface of the measuring object S.

(4) Third Pattern of Measurement Light

FIGS. 9A to 9C are views describing a third pattern of the measurementlight. As shown in FIGS. 9A to 9C, in the third pattern, the measurementlight (hereinafter referred to as striped measurement light) having alinear cross-section that is parallel to the Y direction and that islined in the X direction is emitted from the light projecting unit 110for a plurality of times (16 times in this example).

In other words, in the striped measurement light, the linear brightportion parallel to the Y direction and the linear dark portion parallelto the Y direction are periodically arrayed in the X direction. If thepattern generating portion 112 is the DMD, the dimension of themicro-mirror is assumed as one unit. The width in the X direction ofeach bright portion of the striped measurement light is, for example,three units, and the width in the X direction of each dark portion ofthe striped measurement light is, for example, 13 units. In this case,the period in the X direction of the striped measurement light is 16units. The units of the bright portion and the dark portion differaccording to the configuration of the pattern generating portion 112 ofFIG. 2. For example, if the pattern generating portion 112 is the liquidcrystal, one unit is the dimension of one pixel.

When the striped measurement light of first time is emitted, the lightreflected by the surface of the measuring object S is received by thelight receiving unit 120. The intensity of the received light ismeasured based on the pixel data of a first photographed image of themeasuring object S. FIG. 9A shows the first photographed image of themeasuring object S corresponding to the striped measurement light offirst time.

The measurement light of second time has a pattern in which the brightportion and the dark portion are moved by one unit in the X directionfrom the striped measurement light of first time. When the stripedmeasurement light of second time is emitted, the light reflected by thesurface of the measuring object S is received by the light receivingunit 120. The intensity of the received light is measured based on thepixel data of a second photographed image of the measuring object S.

The measurement light of third time has a pattern in which the brightportion and the dark portion are moved by one unit in the X directionfrom the striped measurement light of second time. When the stripedmeasurement light of third time is emitted, the light reflected by thesurface of the measuring object S is received by the light receivingunit 120. The intensity of the received light is measured based on thepixel data of a third photographed image of the measuring object S.

Similar operation is repeated, so that the intensities of lightcorresponding to the striped measurement light of fourth to sixteenthtimes are respectively measured based on the pixel data of fourth tosixteenth photographed images of the measuring object S. When thestriped measurement light, in which the period in the X direction is 16units, is emitted sixteen times, all the portions of the surface of themeasuring object S are irradiated with the striped measurement light.FIG. 9B shows a seventh photographed image of the measuring object Scorresponding to the striped measurement light of seventh time. FIG. 9Cshows a thirteenth photographed image of the measuring object Scorresponding to the striped measurement light of thirteenth time.

FIG. 10 is a diagram showing a relationship between the timing (order)at which the image of a specific portion of the measuring object S isphotographed and the intensity of the received light. The horizontalaxis of FIG. 10 indicates the order of the image, and the vertical axisindicates the intensity of the received light. As described above, firstto sixteenth photographed images are generated for each portion of themeasuring object S. The intensity of light corresponding to each pixelof the generated first to sixteenth photographed images is thenmeasured.

As shown in FIG. 10, the intensity of light of each pixel of thephotographed image corresponding to the number of the photographed imageis illustrated to obtain a scattergram. The number (order) of thephotographed image when the intensity of light is maximum can beestimated at an accuracy of smaller than one by fitting the Gaussiancurve, a spline curve or a parabola, for example, to the obtainedscattergram. In the example of FIG. 10, the intensity of light isestimated to be maximum in the virtual 9.38th photographed image betweenthe ninth and the tenth according to the curve shown with a fitteddotted line.

The maximum value of the intensity of light can be estimated by thefitted curve. The height h of each portion of the measuring object S canbe calculated based on the number of the photographed image in which theintensity of light estimated at each portion of the measuring object Sis maximum. According to this method, the three-dimensional shape of themeasuring object S is measured based on the intensity of light having asufficiently large S/N (Signal/Noise) ratio. The accuracy in the shapemeasurement of the measuring object S thus can be enhanced.

In the shape measurement of the measuring object S using the measurementlight having a periodic pattern shape such as the sinusoidal measurementlight, the striped measurement light, or the like, the relative height(relative value of height) of each portion on the surface of themeasuring object S is measured. This is because the absolute phasecannot be obtained since each of a plurality of lines (stripes) parallelto the Y direction that form the pattern cannot be identified and theuncertainty corresponding to an integral multiple of one period (2π) ofthe plurality of lines exist. Therefore, based an assumption that theheight of one portion of the measuring object S and the height of aportion adjacent to such a portion continuously change, known unwrappingprocessing may be performed on the data of the measured height.

(5) Fourth Pattern of Measurement Light

FIGS. 11A to 11D are diagrams describing a fourth pattern of themeasurement light. As shown in FIGS. 11A to 11D, in the fourth pattern,the measurement light (hereinafter referred to as coded measurementlight) having a linear cross-section parallel to the Y direction and inwhich the bright portion and the dark portion are lined in the Xdirection is emitted from the light projecting unit 110 for a pluralityof times (four times in this example). The proportions of the brightportion and the dark portion of the coded measurement light are 50%each.

In this example, the surface of the measuring object S is divided into aplurality of (16 in the example of FIGS. 11A to 11D) regions in the Xdirection. Hereinafter, the plurality of divided regions of themeasuring object S in the X direction are referred to as first tosixteenth regions.

FIG. 11A shows the coded measurement light emitted the first time. Thecoded measurement light emitted the first time includes the brightportion irradiated on the first to eighth regions of the measuringobject S. The coded measurement light emitted the first time includesthe dark portion irradiated on the ninth to sixteenth regions of themeasuring object S. Thus, in the coded measurement light emitted thefirst time, the bright portion and the dark portion are parallel in theY direction and are lined in the X direction. Furthermore, theproportions of the bright portion and the dark portion of the codedmeasurement light emitted the first time are 50% each.

FIG. 11B shows the coded measurement light emitted the second time. Thecoded measurement light emitted the second time includes the brightportion applied on the fifth to twelfth regions of the measuring objectS. The coded measurement light emitted the second time includes the darkportions applied on the first to fourth, and thirteenth to sixteenthregions of the measuring object S. Thus, in the coded measurement lightemitted the second time, the bright portion and the dark portion areparallel in the Y direction and are lined in the X direction.Furthermore, the proportions of the bright portion and the dark portionof the coded measurement light emitted the second time are 50% each.

FIG. 11C shows the coded measurement light emitted the third time. Thecoded measurement light emitted the third time includes the brightportions applied on the first, second, seventh to tenth, fifteenth andsixteenth regions of the measuring object S. The coded measurement lightemitted the third time includes the dark portions applied on the thirdto sixth, and eleventh to fourteenth regions of the measuring object S.Thus, in the coded measurement light emitted the third time, the brightportion and the dark portion are parallel in the Y direction and arelined in the X direction. Furthermore, the proportions of the brightportion and the dark portion of the coded measurement light emitted thethird time are 50% each.

FIG. 11D shows the coded measurement light emitted the fourth time. Thecoded measurement light emitted the fourth time includes the brightportions applied on the first, fourth, fifth, eighth, ninth, twelfth,thirteenth, and sixteenth regions of the measuring object S. The codedmeasurement light emitted the fourth time includes the dark portionsapplied on the second, third, sixth, seventh, tenth, eleventh,fourteenth, and fifteenth regions of the measuring object S. Thus, inthe coded measurement light emitted the fourth time, the bright portionand the dark portion are parallel in the Y direction and are lined inthe X direction. Furthermore, the proportions of the bright portion andthe dark portion of the coded measurement light emitted the fourth timeare 50% each.

Logic “1” is assigned to the bright portion of the coded measurementlight, and logic “0” is assigned to the dark portion of the codedmeasurement light. The alignment of the logics of the coded measurementlight of the first time to the fourth time applied on each region of themeasuring object S is referred to as a code. In this case, the firstregion of the measuring object S is irradiated with the codedmeasurement light of code “1011”. Thus, the first region of themeasuring object S is coded to code “1011”.

The second region of the measuring object S is irradiated with the codedmeasurement light of code “1010”. Thus, the second region of themeasuring object S is coded to code “1010”. The third region of themeasuring object S is irradiated with the coded measurement light ofcode “1000”. Thus, the third region of the measuring object S is codedto code “1000”. Similarly, the sixteenth region of the measuring objectS is irradiated with the coded measurement light of code “0011”. Thus,the sixteenth region of the measuring object S is coded to code “0011”.

As described above, the measuring object S is irradiated with the codedmeasurement light for a plurality of times such that one of the digitsof the code differs only by “1” between the adjacent regions of themeasuring object S. In other words, the measuring object S is irradiatedwith the coded measurement light for a plurality of times such that thebright portion and the dark portion change to a gray code pattern.

The light reflected by each region on the surface of the measuringobject S is received by the light receiving unit 120. The code thatchanges due to the existence of the measuring object S is obtained forevery region of the measuring object S by measuring the code of thereceived light. The difference between the obtained code and the codewhen the measuring object S does not exist is obtained for each regionto calculate the distance corresponding to the distance d of FIG. 6. Theabsolute value of the distance d is calculated according to thecharacteristic of the measurement method using the coded measurementlight that the code appears only once in the X-axis direction in theimage. The absolute height (absolute value of height) of the relevantregion of the measuring object S is thereby calculated. Thethree-dimensional shape of the measuring object S can be measured bycalculating the heights of all the regions on the surface of themeasuring object S.

In the above description, the surface of the measuring object S isdivided into 16 regions in the X direction, and the coded measurementlight is emitted from the light projecting unit 110 for four times, butthe present invention is not limited thereto. The surface of themeasuring object S may be divided into 2^(N) regions (N is a naturalnumber) in the X direction, and the coded measurement light may beemitted from the light projecting unit 110 for N times. In the abovedescription, N is set to 4 to facilitate the understanding. N is set to8, for example, in the shape measurement processing according to thepresent embodiment. Therefore, the surface of the measuring object S isdivided into 256 regions in the X direction.

In the shape measurement of the measuring object S using the codedmeasurement light, the distance in which the coded measurement light canbe separated and identified, that is, the distance corresponding to onepixel is the smallest resolution. Therefore, if the number of pixels ofthe visual field in the X direction of the light receiving unit 120 is1024 pixels, the measuring object S having a height of 10 mm, forexample, can be measured with the resolution of 10 mm/1024≈10 μm. Theshape measurement using the coded measurement light in which theresolution is low but the absolute value can be calculated, and theshape measurement using the sinusoidal measurement light or the stripedmeasurement light in which the absolute value cannot be calculated butthe resolution is high may be combined to calculate the absolute valueof the height of the measuring object S at higher resolution.

In particular, in the shape measurement of the measuring object S usingthe striped measurement light of FIGS. 9A to 9C, the resolution may be1/100 pixel. The resolution of 1/100 pixel corresponds to dividing thesurface of the measuring object S into about 100000 regions in the Xdirection (i.e., N≈17) when the number of pixels of the visual field inthe X direction of the light receiving unit 120 is 1024 pixels. Thus,the absolute value of the height of the measuring object S can becalculated at higher resolution by combining the shape measurement usingthe coded measurement light and the shape measurement using the stripedmeasurement light.

A method of scanning the measuring object S with the linear measurementlight is generally referred to as the light section method. A method ofirradiating the measuring object S with the sinusoidal measurementlight, the striped measurement light, or the coded measurement light isclassified as the pattern projection method. Among the patternprojection method, the method of irradiating the measuring object S withthe sinusoidal measurement light or the striped measurement light isclassified as the phase shift method, and the method of irradiating themeasuring object S with the coded measurement light is classified as thespace encoding method.

In the phase shift method, when the sinusoidal measurement light or thestriped measurement light, which has a periodic projection pattern, isemitted, the height of the measuring object S is obtained from a phasedifference of the phase, which is calculated based on the lightreceiving amount reflected from a reference height position when themeasuring object S does not exist, and the phase, which is calculatedbased on the light receiving amount reflected from the surface of themeasuring object S when the measuring object S exists. In the phaseshift method, the individual periodic stripe cannot be distinguished andthe uncertainty corresponding to an integral multiple of one period ofstripe (2π) exists, and hence there is a drawback that the absolutephase cannot be obtained. However, there are advantages that themeasurement time is relatively short and the measurement resolution ishigh since the number of images to acquire is few compared to the lightsection method.

In the space encoding method, the code that changed due to the existenceof the measuring object S is obtained for every region of the measuringobject S. The absolute height of the measuring object S can be obtainedby obtaining the difference between the obtained code and the code whenthe measuring object S does not exist for every region. In the spaceencoding method as well, there are advantages that the measurement canbe carried out with a relatively few number of images, and the absoluteheight can be obtained. However, there is a limit in the measurementresolution compared to the phase shift method.

These projection methods each have advantages and disadvantages, but arecommon in that the methods all use the principle of triangulation.Therefore, the measurement of the shade portion on which the measurementlight is not irradiated is not possible in any of the measurementmethods.

[3] Microscope Mode and Shape Measurement Mode

The shape measuring device 500 according to the present embodiment canoperate in a microscope mode and can also operate in a shape measurementmode. FIGS. 12 and 13 are views showing examples of a GUI of the displaysection 400 at the time of selecting the operation mode. As shown inFIGS. 12 and 13, an image display region 450 and setting changingregions 470, 480 are displayed on the display section 400. The image ofthe measuring object S captured by the light receiving unit 120 isdisplayed in the image display region 450.

In the setting changing region 470 is displayed a brightness selectingfield 471, a brightness setting bar 472, a display switching field 473,a magnification switching field 474, a magnification selecting field475, a focus adjustment field 476, and a focus guide display field 477.The brightness setting bar 472 includes a slider 472 s that can be movedin the horizontal direction.

The user can switch the mode of exposure time of the light receivingunit 120 between auto (automatic) and manual by selecting the mode ofexposure time of the light receiving unit 120 in the brightnessselecting field 471. If manual is selected for the mode of exposure timeof the light receiving unit 120, the user operates the operation unit250 of the PC 200 to move the slider 472 s of the brightness setting bar472 in the horizontal direction, thus adjusting the exposure time of thelight receiving unit 120. The user can switch the type of display of theimage between color and monochrome by selecting the type of display ofthe image from the display switching field 473.

As shown in FIG. 26, to be described later, the light receiving unit 120includes a camera 121A and a camera 121B, having lenses of differentmagnifications from each other, for the camera 121. In this example, onecamera 121A is referred to as a low magnification camera and the othercamera 121B is referred to as a high magnification camera, for example.The user can switch the camera 121 of the light receiving unit 120between the high magnification camera and the low magnification cameraby selecting the magnification of the camera in the magnificationswitching field 474.

The light receiving unit 120 has a digital zoom function. In thisexample, the magnification of the camera 121 can be changed tosubstantially two or more types by combining the two cameras 121 and thedigital zoom function. The user can set the magnification of the camera121 of the light receiving unit 120 by selecting the magnification inthe magnification selecting field 475.

The user can input the numerical value in the focus adjustment field 476to change the focus position of the light receiving unit 120 in the Zdirection by a distance corresponding to the input numerical value. Thefocus position of the light receiving unit 120 is changed by changingthe position of the Z stage 142 of the stage 140, that is, the relativedistance in the Z direction between the light receiving unit 120 and themeasuring object S.

As shown in FIGS. 34A and 34B, and FIGS. 40A and 40B, to be describedlater, the user can display an auxiliary pattern AP on the displaysection 400 or the measuring object S, and display a guide pattern GP onthe measuring object S by operating the focus guide display field 477.The details will be described in “first auxiliary function of focusadjustment”, to be described later.

In the setting changing region 480, a microscope mode selecting tab 480Aand a shape measurement mode selecting tab 480B are displayed. When themicroscope mode selecting tab 480A is selected, the shape measuringdevice 500 operates in the microscope mode. In the microscope mode, themeasuring object S is irradiated with the illumination light from theillumination light output unit 130. In this state, enlarged observationof the measuring object S can be carried out.

As shown in FIG. 12, when the microscope mode selecting tab 480A isselected, a tool selecting field 481 and a photograph button 482 aredisplayed in the setting changing region 480. The user operates thephotograph button 482 to photograph (capture) the image of the measuringobject S displayed in the image display region 450.

A plurality of icons for selecting a plurality of execution tools aredisplayed in the tool selecting field 481. The user operates one of theplurality of icons in the tool selecting field 481 to execute theexecution tool such as planar measurement of the image of the measuringobject S being observed, insertion of scale to the image, depthsynthesis, insertion of comment to the image, improvement of image, andthe like.

For example, when the execution of planar measurement is selected, ameasurement tool display field 481 a and an auxiliary tool display field481 b are displayed below the tool selecting field 481. The measurementtool display field 481 a displays a plurality of icons for executingeach of measurement of distance between two points, measurement ofdistance between two parallel lines, measurement of diameter or radiusof a circle, measurement of an angle formed by two lines, and the like.The auxiliary tool display field 481 b displays a plurality of icons forexecuting auxiliary drawing of dot, line, circle, and the like on theimage in the image display region 450.

When the shape measurement mode selecting tab 480B is selected, theshape measuring device 500 operates in the shape measurement mode. Asshown in FIG. 13, when the shape measurement mode selecting tab 480B isselected, a measurement button 483 is displayed in the setting changingregion 480. The user can execute the shape measurement processing byoperating the measurement button 483 after the preparation of the shapemeasurement is finished.

[4] Texture Image

(1) Synthesized Image

In the measuring section 100, data indicating the image of the state ofthe surface of the measuring object S is generated while beingirradiated with the illumination light from the illumination lightoutput unit 130 or the measurement light having a uniform pattern fromthe light projecting unit 110. The state of the surface includes, forexample, pattern and hue. Hereinafter, the image of the state of thesurface of the measuring object S is referred to as a texture image, andthe data indicating the texture image is referred to as texture imagedata.

The generated texture image data and stereoscopic shape data generatedin the shape measurement processing are synthesized to generatesynthesized data. The display section 400 displays an image in which thestereoscopic shape of the measuring object S and the state of thesurface are synthesized based on the synthesized data. Hereinafter, thestereoscopic shape data generated in the shape measurement processing isreferred to as main stereoscopic shape data. The image displayed basedon the main stereoscopic shape data is referred to as an image of themain stereoscopic shape.

FIG. 14 is a view showing an example of the GUI of the display section400 after the execution of the shape measurement processing. As shown inFIG. 14, the image of the measuring object S is displayed in the imagedisplay region 450 based on the synthesized data generated in the shapemeasurement processing. The user can check the measurement result of themeasuring object S or execute a simple measurement on the synthesizedimage.

If the entire surface of the measuring object S is not positioned withina range of the depth of field although the entire surface of themeasuring object S is positioned in a measurable range in the Zdirection of the light receiving unit 120, the whole or a part of thetexture image will not be clearly displayed. Thus, if the dimension inthe Z direction of the measuring object S is greater than the range ofthe depth of field of the light receiving unit 120, the texture imagedata of the measuring object S positioned within the range of the depthof field of the light receiving unit 120 is acquired while changing therelative distance between the light receiving unit 120 and the measuringobject S. By synthesizing the plurality of acquired texture image data,the texture image data (hereinafter referred to as all-focus textureimage data) from which the entire surface of the measuring object S canbe displayed clearly is generated.

FIG. 15 is a schematic side view of the measuring object S fordescribing the all-focus texture image. The measuring object S of FIG.15 has a configuration in which an electrolytic capacitor Sc is mountedon the circuit substrate Sb. Characters are provided on the uppersurface of the circuit substrate Sb and the electrolytic capacitor Sc.As shown in FIG. 15, the dimension in the Z direction of the measuringobject S (dimension from the lower surface of the circuit substrate Sbto the upper surface of the electrolytic capacitor Sc in this example)is smaller than the measurable range in the Z direction of the lightreceiving unit 120 and greater than the range of the depth of field.

FIGS. 16A to 16F are views showing a relationship between the focusposition of the light receiving unit 120 and the definition of thetexture image. FIGS. 16A, 16C, and 16E show side views of the measuringobject S of FIG. 15. In FIG. 16A, the light receiving unit 120 isfocused on a position a on the upper surface of the electrolyticcapacitor Sc of the measuring object S. In FIG. 16B, the light receivingunit 120 is focused on a position b intermediate between the uppersurface of the electrolytic capacitor Sc and the upper surface of thecircuit substrate Sb of the measuring object S. In FIG. 16C, the lightreceiving unit 120 is focused on a position c on the upper surface ofthe circuit substrate Sb of the measuring object S.

FIG. 16B shows the texture image of the measuring object S based on thetexture image data acquired in the state of FIG. 16A. In this case, theposition a on the upper surface of the electrolytic capacitor Sc ispositioned within the depth of field of the light receiving unit 120,and thus the characters provided to the upper surface of theelectrolytic capacitor Sc are displayed clearly, as shown in FIG. 16B.However, the position c on the upper surface of the circuit substrate Sbis not positioned within the depth of field of the light receiving unit120. Thus, the characters provided to the upper surface of the circuitsubstrate Sb are displayed unclearly. Furthermore, the position c on theupper surface of the circuit substrate Sb is also not positioned withinthe measurable range in the Z direction of the light receiving unit 120.Therefore, when the height of the stage 140 is aligned with the positionin FIG. 16E, the height of the position a on the upper surface of theelectrolytic capacitor Sc cannot be calculated, or the reliability ofthe calculated height lowers.

FIG. 16D shows the texture image of the measuring object S based on thetexture image data acquired in the state of FIG. 16C. In this case, theposition b intermediate of the upper surface of the electrolyticcapacitor Sc and the upper surface of the circuit substrate Sb ispositioned within the range of the depth of field of the light receivingunit 120. However, the upper surface of the electrolytic capacitor Scand the upper surface of the circuit substrate Sb are positioned outsidethe range of the depth of field and within the measurable range in the Zdirection of the light receiving unit 120, and thus the charactersprovided to the upper surface of the electrolytic capacitor Sc and thecharacters provided to the upper surface of the circuit substrate Sb aredisplayed slightly unclearly, as shown in FIG. 16D.

FIG. 16F shows the texture image of the measuring object S based on thetexture image data acquired in the state of FIG. 16E. In this case, theposition c on the upper surface of the circuit substrate Sb ispositioned within the range of the depth of field of the light receivingunit 120, and thus the characters provided to the upper surface of thecircuit substrate Sb are displayed clearly, as shown in FIG. 16F.However, the position a on the upper surface of the electrolyticcapacitor Sc is not positioned within the range of the depth of field ofthe light receiving unit 120. Thus, the characters provided to the uppersurface of the electrolytic capacitor Sc are displayed unclearly. Theposition a on the upper surface of the electrolytic capacitor Sc is alsonot positioned within the measurable range in the Z direction of thelight receiving unit 120. Therefore, when the height of the stage 140 isaligned with the position in FIG. 16A, the height of the position c onthe upper surface of the circuit substrate Sb cannot be calculated, orthe reliability of the calculated height lowers.

The all-focus texture image data is generated by synthesizing thetexture image data of the positions a to c. FIG. 17 shows an all-focustexture image of the measuring object S based on the generated all-focustexture image data. As shown in FIG. 17, in the all-focus texture image,the characters provided to the upper surface of the electrolyticcapacitor Sc are displayed clearly, and the characters provided to theupper surface of the circuit substrate Sb are also displayed clearly.

As described above, the height at which the light receiving unit 120 isfocused is changed with respect to the measuring object S by changingthe relative position in the Z direction between the light receivingunit 120 and the stage 140. Thus, even with the measuring object Shaving a level difference that cannot be accommodated within the rangeof the depth of field of the light receiving unit 120 at once, theall-focus texture image in which all portions are focused can beacquired by synthesizing a plurality of texture images captured whilechanging the focus of the light receiving unit 120. Note that the depthof field has a width unique to the shape measuring device 500 thatchanges according to the magnification of the lens of the lightreceiving unit 120.

When generating the all-focus texture image, the relative positions inthe Z direction of the light receiving unit 120 and the stage 140 arechanged within a predetermined range at a predetermined interval toacquire a plurality of texture images. The range and interval alongwhich the light receiving unit 120 and the stage 140 are relativelymoved in the Z direction are values unique to the shape measuring device500. However, if the shape of the measuring object S is known such aswhen the shape measurement processing of the measuring object S isexecuted in advance, when data (e.g., CAD data) indicating the shape ofthe measuring object S is obtained in advance, or the like, the optimummoving range and interval may be determined based on such data.

For example, a range slightly wider than the range defined by the upperlimit and the lower limit of the height of the measuring object S may beassumed as the moving range. The interval may be changed according tothe gradient of the height shape of the measuring object S. Theparameters for defining the relative movement in the Z direction of thestage 140 and the light receiving unit 120 when acquiring the all-focustexture image may be arbitrarily set by the user.

The all-focus texture image data is generated by synthesizing aplurality of pieces of texture image data for a portion included withinthe range of the depth of field of the light receiving unit 120 of allthe portions of the measuring object S. In acquiring the texture imagedata of each portion of the measuring object S, the height of eachportion of the measuring object S is calculated based on the relativedistance between the light receiving unit 120 and the measuring object Swhen each portion of the measuring object S is included within the rangeof the depth of field of the light receiving unit 120.

The data indicating the stereoscopic shape of the measuring object S isgenerated by synthesizing the heights calculated for all the portions ofthe measuring object S. The data indicating the stereoscopic shape ofthe measuring object S is referred to as sub-stereoscopic shape data.The all-focus texture image data and the main stereoscopic shape dataare synthesized to generate the synthesized data.

FIGS. 18A and 18B show synthesized images of the measuring object Sbased on the synthesized data. FIG. 18A shows an image of the mainstereoscopic shape of the measuring object S based on the mainstereoscopic shape data. The main stereoscopic shape data showing themain stereoscopic shape of FIG. 18A and the all-focus texture image dataare synthesized to generate the synthesized data. FIG. 18B shows asynthesized image based on the generated synthesized data. As shown inFIG. 18B, even if the dimension in the Z direction of the measuringobject S is greater than the range of the depth of field of the lightreceiving unit 120, the surface states of the different height portionsof the measuring object S are displayed clearly.

The value of each pixel of the main stereoscopic shape data indicatesthe height data at the position of the relevant pixel. The value of eachpixel of the all-focus texture image data, on the other hand, indicatesthe texture information (information on state of surface) includingcolor and luminance at the position of the relevant pixel. Therefore,the synthesized image shown in FIGS. 18A and 18B can be generated bysynthesizing the information of the corresponding pixels.

The shape measurement of the measuring object S is carried out normallyin one processing, the details of which will be described later. Forexample, in the example of FIG. 16A, the height of the position c on theupper surface of the circuit substrate Sb cannot be calculated since theposition c on the upper surface of the circuit substrate Sb is notwithin the measurable range of the light receiving unit 120. Therefore,as shown in FIG. 16C, the relative distance in the Z direction betweenthe light receiving unit 120 and the stage 140 needs to be adjusted sothat the entire measuring object S is accommodated within the measurablerange in the Z direction of the light receiving unit 120 as much aspossible.

In the processing of generating the all-focus texture image, the imagingis carried out a plurality of times while changing the relative distancein the Z direction between the light receiving unit 120 and the stage140. Thus, the relative distance between the light receiving unit 120and the stage 140 is not required to be adjusted in advance so that theentire measuring object S is accommodated within the range of the depthof field of the light receiving unit 120 in one imaging. Therefore, theuser adjusts the relative distance in the Z direction between the lightreceiving unit 120 and the stage 140 with regard to whether or not themeasuring object S is accommodated within the measurable range in the Zdirection of the light receiving unit 120 for performing the shapemeasurement processing and not the range of the depth of field of thelight receiving unit 120 when acquiring the texture image.

When performing the shape measurement processing at the position of thestage 140 shown in FIG. 16A, the height of the position c on the uppersurface of the circuit substrate Sb cannot be calculated, or thereliability of the calculated height lowers. In the processing ofgenerating the all-focus texture image, the imaging is carried out aplurality of times while changing the relative distance in the Zdirection between the light receiving unit 120 and the stage 140, andthus the texture image in which the light receiving unit 120 is focusedon the position c on the upper surface of the circuit substrate Sb canbe acquired. Therefore, even if the height data is lacked or the pixelof low reliability exists at a part of the texture image, the textureinformation of the all-focus texture image data can be given to therelevant pixel.

In the shape measurement processing using the triangular distancemeasurement according to the present invention, the measurable range inthe Z direction of the light receiving unit 120 is generally wider thanthe range of the depth of field of the light receiving unit 120. This isbecause in the triangular distance measurement, the shape of themeasuring object S can be measured even if the image is blurred to someextent. However, the range of the depth of field of the light receivingunit 120 is a subjective range that appears to be in-focus to the user.Although the measurable range in the Z direction of the light receivingunit 120 is a value unique to the shape measuring device 500 defined bythe light projecting unit 110 and the light receiving unit 120, themeasuring object S not within the measurable range in the Z direction ofthe light receiving unit 120 is not necessarily unmeasurable.

Furthermore, if the level difference of the measuring object S is large,the entire measuring object S may not be measured all at once no matterhow the relative distance in the Z direction between the light receivingunit 120 and the stage 140 is adjusted. In this case, the shapemeasurement processing is carried out a plurality of times whilechanging the relative distance in the Z direction between the lightreceiving unit 120 and the stage 140 even when performing the shapemeasurement processing, so that the stereoscopic shape configured by theheight data having the highest reliability of each pixel can beacquired. In this case, the measurement of the entire measuring object Shaving the level difference exceeding the measurable range in the Zdirection of the light receiving unit 120 is enabled, and the textureinformation can be given to the entire stereoscopic shape of themeasuring object S having a large level difference.

In the example of FIGS. 18A and 18B, the texture image is synthesized tothe measuring object S displayed three-dimensionally, but the presentinvention is not limited thereto. For example, the texture informationmay be displayed in a superimposed manner on the two-dimensional imagein which the height of the measuring object S is represented by changein hue. In this case, the image having an intermediate hue and luminancebetween the two-dimensional image showing the height and the textureimage may be generated and displayed by allowing the user to adjust theratio between the two-dimensional image indicating the height and thetexture information, for example.

In the above description, the all-focus texture image data and thesub-stereoscopic shape data are respectively generated based on thetexture image data and the height of three positions a to c tofacilitate the understanding, but the present invention is not limitedthereto. The all-focus texture image data and the sub-stereoscopic shapedata may be respectively generated based on the texture image data andthe height of two or less, or four or more positions.

In this example, the position in the Z direction of the measuring objectS is changed from the upper limit toward the lower limit, or from thelower limit toward the upper limit of the measurable range in the Zdirection of the light receiving unit 120 at an interval smaller thanthe range of the depth of field of the light receiving unit 120. Theall-focus texture image data and the sub-stereoscopic shape data arerespectively generated based on the texture image data and the height ofeach position in the Z direction.

Alternatively, if the main stereoscopic shape data of the measuringobject S is generated before the generation of the all-focus textureimage data and the sub-stereoscopic shape data, the upper end and thelower end in the Z direction of the measuring object S can be calculatedbased on the main stereoscopic shape data. Therefore, the position inthe Z direction of the measuring object S may be changed from the upperend toward the lower end, or from the lower end toward the upper end ofthe dimension in the Z direction of the measuring object S at aninterval smaller than the range of the depth of field of the lightreceiving unit 120. The all-focus texture image data and thesub-stereoscopic shape data are respectively generated based on thetexture image data and the height of each position in the Z direction.

In this case, the texture image data can be acquired in a minimum rangefor generating the all-focus texture image data and the sub-stereoscopicshape data of the measuring object S, and the height can be calculated.Thus, the all-focus texture image data and the sub-stereoscopic shapedata can be generated at high speed.

(2) Type of Texture Image

The user can select the type of texture image when acquiring the textureimage data. The type of texture image includes, for example, normaltexture image, all-focus texture image, high dynamic range (HDR) textureimage, and a combination of the same. When the all-focus texture imageis selected, the all-focus texture image data described above isgenerated. When the HDR texture image is selected, the texture imagedata is generated in which a known high dynamic range (HDR) synthesis iscarried out.

When the difference in reflectivity of a plurality of portions of thesurface of the measuring object S or a difference in brightnessdepending on hue is small and the dimension of the measuring object S inthe Z direction is greater than the depth of field of the lightreceiving unit 120, the user selects the all-focus texture image. Thetexture image data that clearly indicates the surface state of themeasuring object S then can be generated in a short time. When thesurface of the measuring object S includes a portion of highreflectivity and a portion of low reflectivity, or when the differencein brightness depending on hue is large, the user selects the HDRtexture image. Thus, there can be generated the texture image data thatclearly indicates the surface state of the measuring object S that doesnot include the underexposure and the overexposure.

In the normal texture image, the synthesis of the texture image is notcarried out. In this case, one texture image data is generated based onthe light receiving signal output by the light receiving unit 120 withthe focus position of the light receiving unit 120 fixed. When thedifference in reflectivity or the difference in brightness depending onhue of the plurality of portions of the surface of the measuring objectS is small and the dimension of the measuring object S in the Zdirection is smaller than the range of the depth of field of the lightreceiving unit 120, the user selects the normal texture image. Thus,there can be generated the texture image data that clearly indicates thesurface state of the measuring object S in a shorter time.

When the HDR texture image is selected, a plurality of pieces of textureimage data are generated under different imaging conditions at oneposition in the Z direction. The imaging conditions include an exposuretime of the light receiving unit 120. The imaging conditions may includean intensity (brightness) of the illumination light from theillumination light output unit 130 or an intensity (brightness) of theuniform measurement light from the light projecting unit 110. In suchcases, the CPU 210 can easily generate a plurality of pieces of textureimage data under a plurality of imaging conditions.

The plurality of pieces of generated texture image data are synthesized(HDR synthesis) so that the texture image at a certain position in the Zdirection does not include the underexposure and the overexposure. Thedynamic range of the texture image is thereby enlarged. The HDR textureimage is displayed based on the HDR synthesized texture image data(hereinafter referred to as HDR texture image data).

When the combination of the all-focus texture image and the HDR textureimage (hereinafter referred to as HDR all-focus texture image) isselected, a plurality of pieces of texture image data are acquired underdifferent imaging conditions at each position in the Z direction whilechanging the position in the Z direction of the measuring object S. Theplurality of pieces of texture image data acquired at each position inthe Z direction are HDR synthesized such that the dynamic range of theimage at the position in the Z direction is enlarged, thus generatingthe HDR texture image data.

Furthermore, the HDR texture image data (hereinafter referred to as HDRall-focus texture image data) that can be displayed on the entiresurface of the measuring object S is generated by synthesizing theplurality of pieces of HDR texture image data for the portion includedwithin the range of the depth of field of the light receiving unit 120of all the portions of the measuring object S. The HDR all-focus textureimage is displayed based on the HDR all-focus texture image data.

As described above, when the surface of the measuring object S includesthe portion of high reflectivity and the portion of low reflectivity orthe difference in brightness depending on hue is large, and thedimension of the measuring object S is greater than the depth of fieldof the light receiving unit, the user selects the HDR all-focus textureimage. The texture image data that clearly indicates the surface stateof the measuring object S then can be generated.

FIG. 19 is a view showing an example of the GUI of the display section400 at the time of selecting the type of texture image. As shown in FIG.19, at the time of selecting the type of texture image, a texture imageselecting field 484 is displayed in the setting changing region 480 ofthe display section 400. The texture image selecting field 484 displaysthree check boxes 484 a, 484 b, and 484 c.

The user specifies the check box 484 a to 484 c to select the normaltexture image, the HDR texture image, and the all-focus texture image,respectively. The user specifies the check boxes 484 b, 484 c to selectthe HDR all-focus texture image.

(3) Correction of Main Stereoscopic Shape Data

The accuracy of the sub-stereoscopic shape data is lower than theaccuracy of the main stereoscopic shape data. However, since the mainstereoscopic shape data is generated based on the triangular distancemeasuring method, the measuring object S needs to be irradiated withlight at an angle different from that of the optical axis of the lightreceiving unit 120 in order to generate the main stereoscopic shapedata. The main stereoscopic shape data thus often contain a defectiveportion that corresponds to a region where the shape of the measuringobject S cannot be accurately measured. The defective portion includesblank data corresponding to a portion of shade of the image, noise datacorresponding to a portion of noise, or pseudo-shape data correspondingto a portion of pseudo-shape of the measuring object S due to multiplereflection or the like.

In order to generate the sub-stereoscopic shape data, on the other hand,the measuring object S is not required to be irradiated with light at anangle different from that of the optical axis of the light receivingunit 120, and the measuring object S can be irradiated at an anglesubstantially equal to that of the optical axis of the light receivingunit 120. In this case, the sub-stereoscopic shape data hardly containsthe defective portion. Therefore, the sub-stereoscopic shape data thathardly contains the defective portion can be generated by using theillumination light emitted from the illumination light output unit 130,which is arranged substantially above the measuring object S.

The defective portion of the main stereoscopic shape data is determinedbased on the sub-stereoscopic shape data. In this example, thesub-stereoscopic shape data and the main stereoscopic shape data of thesame measuring object S are compared. The defective portion of the mainstereoscopic shape data thus can be easily determined. On the otherhand, in the shape measurement processing, when the contrast of thepattern of the measurement light partially lowers, the reliability ofthe portion of the main stereoscopic shape data corresponding to such aportion lowers.

In this case as well, the portion of low reliability in the mainstereoscopic shape data can be determined based on the sub-stereoscopicshape data and the main stereoscopic shape data. In this example, thesub-stereoscopic shape data and the main stereoscopic shape data arecompared. A difference between each portion of the sub-stereoscopicshape data and each portion of the main stereoscopic shape data iscalculated respectively, and determination is made that the portion ofthe main stereoscopic shape data where the difference is greater than athreshold value defined in advance has low reliability.

As described above, the portion where deviation from thesub-stereoscopic shape data is greater than the threshold value of theplurality of portions of the main stereoscopic shape data is determinedto have low reliability. The threshold value may be a fixed value, ormay be a variable value that can be arbitrarily adjusted by the user byoperating the slider, and the like. The portion determined to have lowreliability in the main stereoscopic shape data is referred to as lowreliability portion of the main stereoscopic shape data.

The defective portion or the low reliability portion of the mainstereoscopic shape data may be subjected to correction such asreplacement, interpolation, or the like by the corresponding portion ofthe sub-stereoscopic shape data. The user then can observe the image ofthe main stereoscopic shape or the synthesized image of the measuringobject S that does not contain the defective portion in appearance orthe low reliability portion on the display section 400. The reliabilityof the low reliability portion of the main stereoscopic shape data canbe enhanced. In correcting the main stereoscopic shape data, thedefective portion or the low reliability portion of the mainstereoscopic shape data may be interpolated by the portion of the mainstereoscopic shape data at the periphery of the defective portion or thelow reliability portion.

FIGS. 20A and 20B, FIGS. 21A and 21B, and FIGS. 22A and 22B are viewsdescribing the correction of the main stereoscopic shape data by thesub-stereoscopic shape data. FIGS. 20A and 20B respectively show theimage of the main stereoscopic shape and the synthesized image of themeasuring object S. FIGS. 21A and 21B respectively show the image of thesub-stereoscopic shape and the synthesized image of the measuring objectS. FIGS. 22A and 22B respectively show the corrected image of the mainstereoscopic shape and the corrected synthesized image of the measuringobject S.

As shown in FIGS. 20A and 20B, the image of the main stereoscopic shapeand the synthesized image contain the shade Ss, which is based on theblank data, and also contain the pseudo-shape Sp, which is based on thepseudo-shape data. On the contrary, the image of the sub-stereoscopicshape and the synthesized image do not have the influence of shade, asshown in FIGS. 21A and 21B.

The portions of the shade Ss and the pseudo-shape Sp in the image of themain stereoscopic shape and the synthesized image of FIGS. 20A and 20Bare corrected by the corresponding portions of the image of thesub-stereoscopic shape and the all-focus texture image of FIGS. 21A and21B. The image of the main stereoscopic shape and the synthesized imagewithout the influence of shade thus can be observed, as shown in FIGS.22A and 22B.

When displaying the image of the main stereoscopic shape or the textureimage on the display section 400, the defective portion or the lowreliability portion of the main stereoscopic shape data may not becorrected, and the portion of the stereoscopic shape image or thetexture image corresponding to the defective portion or the lowreliability portion of the main stereoscopic shape data may behighlighted. Alternatively, when displaying the corrected image of themain stereoscopic shape on the display section 400, the portion of theimage of the corrected stereoscopic shape corresponding to the defectiveportion or the low reliability portion of the main stereoscopic shapedata may be highlighted with the defective portion or the lowreliability portion of the main stereoscopic shape data corrected. Theuser thus can easily and reliably recognize the defective portion or thelow reliability portion of the main stereoscopic shape data. Thedefective portion or the low reliability portion of the mainstereoscopic shape data may be handled as invalid data in measuring oranalyzing the measurement position in the shape measurement processing.

In the shape measurement processing, if the main stereoscopic shape datais generated using the measurement light from both light projectingunits 110A, 110B, the main stereoscopic shape data based on themeasurement light from the light projecting units 110A, 110B aresynthesized with an appropriate weighting to generate the mainstereoscopic shape data. If the main stereoscopic shape data based onone measurement light contains the defective portion or the lowreliability portion, the weighting in the synthesis of the mainstereoscopic shape data based on the one measurement light may bereduced and the weighting in the synthesis of the main stereoscopicshape data based on the other measurement light may be increased, forthe relevant portion.

(4) Improvement in Efficiency of Shape Measurement Processing

In the shape measurement processing of FIGS. 30 to 32, to be describedlater, the measuring object S is irradiated with the coded measurementlight (see FIG. 11), and then irradiated with the striped measurementlight (see FIG. 9) from the light projecting unit 110. In this case, theabsolute value of the height of each portion of the measuring object Sis calculated based on the coded measurement light, and the relativevalue of the height of each portion of the measuring object S iscalculated at high resolution based on the striped measurement light.The absolute value of the height of each portion of the measuring objectS is thereby calculated at high resolution. In other words, the absolutevalue of the height calculated based on the striped measurement light isdetermined by the height calculated based on the coded measurementlight.

Alternatively, the absolute value of the height calculated based on thestriped measurement light may be determined by the height of eachportion in the sub-stereoscopic shape data. In this case, the measuringobject S may not be irradiated with the coded measurement light from thelight projecting unit 110 in the shape measurement processing. The shapemeasurement processing thus can be executed efficiently and in a shorttime while calculating the absolute value of the height of each portionof the measuring object S at high resolution.

[5] Shape Measurement Processing

(1) Preparation of Shape Measurement

The user prepares for the shape measurement before executing the shapemeasurement processing of the measuring object S. FIG. 23 is a flowchartshowing a procedure for the preparation of the shape measurement.Hereinafter, the procedure for the preparation of the shape measurementwill be described with reference to FIGS. 1, 2, and 23. The user firstmounts the measuring object S on the stage 140 (step S1). The user thenirradiates the measuring object S with the illumination light from theillumination light output unit 130 (step S2). The image of the measuringobject S is thereby displayed on the display section 400. The user thenadjusts the light amount of the illumination light, the focus of thelight receiving unit 120, as well as the position and the posture of themeasuring object S (hereinafter referred to as first adjustment) whileviewing the image of the measuring object S displayed on the displaysection 400 (step S3).

The user then stops the irradiation of the illumination light, andirradiates the measuring object S with the measurement light from thelight projecting unit 110 (step S4). The image of the measuring object Sis thereby displayed on the display section 400. The user then adjuststhe light amount of the measurement light, the focus of the lightreceiving unit 120, as well as the position and the posture of themeasuring object S (hereinafter referred to as second adjustment) whileviewing the image of the measuring object S displayed on the displaysection 400 (step S5). In step S5, if there is no shade at the positiondesired to be measured in the measuring object S, the user is notrequired to perform the adjustment of the focus of the light receivingunit 120, as well as the position and the posture of the measuringobject S for the second adjustment, and merely needs to adjust the lightamount of the measurement light.

The user thereafter stops the irradiation of the measurement light, andagain irradiates the measuring object S with the illumination light fromthe illumination light output unit 130 (step S6). The image of themeasuring object S is thereby displayed on the display section 400. Theuser then checks the image of the measuring object S displayed on thedisplay section 400 (step S7). The user determines whether or not thelight amount of the light, the focus of the light receiving unit 120, aswell as the position and the posture of the measuring object S(hereinafter referred to as observation state) are appropriate from theimage of the measuring object S displayed on the display section 400(step S8).

If determined that the observation state is not appropriate in step S8,the user returns to the processing of step S2. If determined that theobservation state is appropriate in step S8, the user terminates thepreparation of the shape measurement.

In the above description, the second adjustment is carried out after thefirst adjustment, but the present invention is not limited thereto. Thefirst adjustment may be carried out after the second adjustment. In thiscase, the measuring object S is irradiated with the measurement light,and not with the illumination light in step S6. Furthermore, if theadjustment of the focus of the light receiving unit 120 as well as theposition and the posture of the measuring object S in the secondadjustment is not carried out in step S5, the user may omit theprocedure of steps S6 to S8 and terminate the preparation of the shapemeasurement.

(2) First Adjustment

FIGS. 24 and 25 are flowcharts showing details of the first adjustmentin the procedure for the preparation of the shape measurement. Thedetails of the first adjustment in the procedure for the preparation ofthe shape measurement will be hereinafter described with reference toFIGS. 1, 2, 24, and 25. First, the user adjusts the light amount of theillumination light (step S11). The light amount of the illuminationlight is adjusted by adjusting the brightness of the illumination lightemitted from the illumination light source 320 of the control section300 or the exposure time of the light receiving unit 120. The user thendetermines whether or not the light amount of the illumination lightapplied on the measuring object S is appropriate based on the image ofthe measuring object S displayed on the display section 400 (step S12).

If determined that the light amount of the illumination light is notappropriate in step S12, the user returns to the processing of step S11.If determined that the light amount of the illumination light isappropriate in step S12, the user adjusts the focus of the lightreceiving unit 120 (step S13). The focus of the light receiving unit 120is adjusted by changing the position of the Z stage 142 of the stage140, and adjusting the relative distance in the Z direction between thelight receiving unit 120 and the measuring object S. The user thendetermines whether or not the focus of the light receiving unit 120 isappropriate based on the image of the measuring object S displayed onthe display section 400 (step S14).

If determined that the focus of the light receiving unit 120 is notappropriate in step S14, the user returns to the processing of step S13.If determined that the focus of the light receiving unit 120 isappropriate in step S14, the user adjusts the position and the postureof the measuring object S (step S15). The position and the posture ofthe measuring object S are adjusted by changing the position of the X-Ystage 141 and the angle of the θ stage 143 of the stage 140.

The user then determines whether or not the position and the posture ofthe measuring object S are appropriate based on the image of themeasuring object S displayed on the display section 400 (step S16). Ifthe measurement position of the measuring object S is included in thevisual field range of the light receiving unit 120, the user determinesthat the position and the posture of the measuring object S areappropriate. If the measurement position of the measuring object S isnot included in the visual field range of the light receiving unit 120,the user determines that the position and the posture of the measuringobject S are not appropriate.

If determined that the position and the posture of the measuring objectS are not appropriate in step S16, the user returns to the processing ofstep S15. If determined that the position and the posture of themeasuring object S are appropriate in step S16, the user adjusts thevisual field size (step S17). The visual field size is adjusted, forexample, by changing the magnification of the lens of the camera 121 ofthe light receiving unit 120.

The user then determines whether or not the visual field size isappropriate based on the image of the measuring object S displayed onthe display section 400 (step S18). If determined that the visual fieldsize is not appropriate in step S18, the user returns to the processingof step S17. If determined that the visual field size is appropriate instep S18, the user selects the type of texture image (step S19), andterminates the first adjustment. The light amount condition of theillumination light optimum for generating the texture image data is setby performing the first adjustment.

In step S17, the light receiving unit 120 may include a plurality ofcameras 121, in which the magnifications of the lenses differ from eachother, and the magnification of the lens may be changed by switching thecameras 121. Alternatively, one camera 121 in which the magnification ofthe lens can be switched may be arranged, and the magnification of thelens may be changed by switching the magnification of the lens.Furthermore, the visual field size may be adjusted by the digital zoomfunction of the light receiving unit 120 without changing themagnification of the lens.

FIG. 26 is a schematic view showing the light receiving unit 120 of FIG.2 seen from the X direction. As shown in FIG. 26, the light receivingunit 120 includes cameras 121A, 121B for the plurality of cameras 121.The magnification of the lens of the camera 121A and the magnificationof the lens of the camera 121B are different from each other. The lightreceiving unit 120 further includes a half mirror 124.

The light that passed the plurality of lenses 122, 123 is separated intotwo pieces of light by the half mirror 124. One light is received by thecamera 121A, and the other light is received by the camera 121B. Themagnification of the lens can be changed by switching the camera 121,which outputs the light receiving signal to the control board 150 ofFIG. 1, between the camera 121A and the camera 121B. The switchingbetween the camera 121A and the camera 121B is carried out by selectingthe magnification of the camera in the magnification switching field 474of FIG. 13.

(3) Second Adjustment

FIGS. 27 and 28 are flowcharts showing details of the second adjustmentin the procedure for the preparation of the shape measurement. Thedetails of the second adjustment in the procedure for the preparation ofthe shape measurement will be hereinafter described with reference toFIGS. 1, 2, 27, and 28. The user first adjusts the light amount of onemeasurement light (step S21).

The user then determines whether or not the position and the posture ofthe measuring object S are appropriate based on the image of themeasuring object S displayed on the display section 400 (step S22). Ifthere is no shade at the measurement position of the measuring object S,the user determines that the position and the posture of the measuringobject S are appropriate. If there is shade at the measurement positionof the measuring object S, the user determines that the position and theposture of the measuring object S are not appropriate.

If determined that the position and the posture of the measuring objectS are not appropriate in step S22, the user adjusts the position and theposture of the measuring object S (step S23). The position and theposture of the measuring object S are adjusted by changing the positionof the X-Y stage 141 and the angle of the θ stage 143 of the stage 140.Thereafter, the user returns to the processing of step S22.

If determined that the position and the posture of the measuring objectS are appropriate in step S22, the user determines whether or not thelight amount of one measurement light applied on the measuring object Sis appropriate based on the image of the measuring object S displayed onthe display section 400 (step S24).

If determined that the light amount of the one measurement light is notappropriate in step S24, the user adjusts the light amount of the onemeasurement light (step S25). The user then returns to the processing ofstep S24.

If determined that the light amount of the one measurement light isappropriate in step S24, the user determines whether or not the focus ofthe light receiving unit 120 is appropriate based on the image of themeasuring object S displayed on the display section 400 (step S26).

If determined that the focus of the light receiving unit 120 is notappropriate in step S26, the user adjusts the focus of the lightreceiving unit 120 (step S27). The focus of the light receiving unit 120is adjusted by changing the position of the Z stage 142 of the stage140, and adjusting the relative distance in the Z direction between thelight receiving unit 120 and the measuring object S. The user thereafterreturns to the processing of step S26.

If determined that the focus of the light receiving unit 120 isappropriate in step S26, the user determines whether or not theobservation state is appropriate from the image of the measuring objectS displayed on the display section 400 (step S28).

If determined that the observation state is not appropriate in step S28,the user returns to the processing of step S23, step S25, or step S27.Specifically, the user returns to the processing of step S23 whendetermining that the position and the posture of the measuring object Sare not appropriate in the observation state. The user returns to theprocessing of step S25 when determining that the light amount of thelight (one measurement light) is not appropriate in the observationstate. The user returns to the processing of step S27 when determiningthat the focus of the light receiving unit 120 is not appropriate in theobservation state.

If determined that the observation state is appropriate in step S28, theuser stops the irradiation of the one measurement light and irradiatesthe measuring object S with the measurement light from the other lightprojecting unit 110B (step S29). The image of the measuring object S isthereby displayed on the display section 400. The user then adjusts thelight amount of the other measurement light while viewing the image ofthe measuring object S displayed on the display section 400 (step S30).

The user then determines whether or not the light amount of the othermeasurement light is appropriate based on the image of the measuringobject S displayed on the display section 400 (step S31). If determinedthat the light amount of the other measurement light is not appropriatein step S31, the user returns to the processing of step S30. Ifdetermined that the light amount of the other measurement light isappropriate in step S31, the user terminates the second adjustment. Thelight amount condition of the one measurement light and the othermeasurement light optimum for generating the main stereoscopic shapedata is set by performing the second adjustment. If the other lightprojecting unit 110B is not used, the user may omit the procedure ofsteps S29 to S31 and terminate the second adjustment after theprocessing of step S28.

FIG. 29 is a view showing an example of the GUI of the display section400 at the time of executing the second adjustment. As shown in FIG. 29,the light amount setting bars 430, 440, similar to FIG. 5, are displayedin the setting changing region 480 of the display section 400 at thetime of executing the second adjustment. The user can operate theoperation unit 250 and move the slider 430 s of the light amount settingbar 430 in the horizontal direction to change the light amount of theone measurement light. Similarly, the user can operate the operationunit 250 and move the slider 440 s of the light amount setting bar 440in the horizontal direction to change the light amount of the othermeasurement light.

At the time of executing the second adjustment, three image displayregions 450 a, 450 b, and 450 c are arranged in the display section 400.In the image display region 450 a is displayed an image of the measuringObject S when irradiated with the one measurement light and the othermeasurement light. The image display region 450 b displays an image ofthe measuring object S when irradiated with the one measurement light.The image display region 450 c displays an image of the measuring objectS when irradiated with the other measurement light.

The image is displayed in the image display regions 450 a to 450 c suchthat the portion where the overexposure has occurred due to excessivebrightness and the portion where the underexposure has occurred due toexcessive darkness can be identified. In the example of FIG. 29, theportion where the overexposure has occurred due to excessive brightnessis highlighted with a dot pattern. The portion where the underexposurehas occurred due to excessive darkness is highlighted with a hatchingpattern.

(4) Shape Measurement Processing

The shape measurement processing of the measuring object S is executedafter preparing for the shape measurement of FIG. 23. FIGS. 30, 31, and32 are flowcharts showing the procedure for the shape measurementprocessing. The procedure for the shape measurement processing will behereinafter described with reference to FIGS. 1, 2, and 30 to 32. Theuser instructs the start of the shape measurement processing to the CPU210 after finishing the preparation of the shape measurement. The CPU210 determines whether or not the start of the shape measurementprocessing is instructed by the user (step S41).

If the start of the shape measurement processing is not instructed instep S41, the CPU 210 waits until the start of the shape measurementprocessing is instructed. The user can prepare for the shape measurementbefore instructing the start of the shape measurement processing. If thestart of the shape measurement processing is instructed in step S41, theCPU 210 irradiates the measuring object S with the measurement lightfrom the light projecting unit 110 according to the light amountcondition set in the second adjustment, and acquires an image(hereinafter referred to as pattern image) in which the pattern of themeasurement light is projected onto the measuring object S (step S42).The acquired pattern image is stored in the working memory 230.

The CPU 210 processes the acquired pattern image with a predeterminedmeasurement algorithm to generate the main stereoscopic shape dataindicating the stereoscopic shape of the measuring object S (step S43).The generated main stereoscopic shape data is stored in the workingmemory 230. The CPU 210 then displays the image of the main stereoscopicshape of the measuring object S on the display section 400 based on thegenerated main stereoscopic shape data (step S44).

The CPU 210 then determines whether or not the stereoscopic shape of theposition to be measured (hereinafter referred to as measurementposition) is displayed based on the instruction of the user (step S45).The user instructs the CPU 210 whether or not the stereoscopic shape ofthe measurement position is displayed by viewing the image of the mainstereoscopic shape of the measuring object S displayed on the displaysection 400.

If determined that the stereoscopic shape of the measurement position isnot displayed in step S45, the CPU 210 returns to the processing of stepS41. The CPU 210 then waits until the start of the shape measurementprocessing is instructed, and the user can prepare for the shapemeasurement so that the stereoscopic shape of the measurement positionis displayed before again instructing the start of the shape measurementprocessing. If determined that the stereoscopic shape of the measurementposition is displayed in step S45, the CPU 210 determines whether or notthe normal texture image is selected in step S19 of the first adjustmentof FIG. 25 by the user (step S46).

The CPU 210 determines that the normal texture image is selected whenthe check box 484 a of the texture image selecting field 484 of FIG. 19is specified. The CPU 210 also determines that the normal texture imageis selected even when none of the check boxes 484 a to 484 c of thetexture image selecting field 484 of FIG. 19 are specified.

If determined that the normal texture image is selected in step S46, theCPU 210 irradiates the measuring object S with the illumination lightfrom the illumination light output unit 130 according to the lightamount condition set in the first adjustment, and generates the normaltexture image data of the measuring object S (step S47). The CPU 210thereafter proceeds to the processing of step S55.

If determined that the normal texture image is not selected in step S46,the CPU 210 determines whether or not the all-focus texture image isselected in step S19 of the first adjustment of FIG. 25 by the user(step S48). The CPU 210 determines that the all-focus texture image isselected when the check box 484 c of the texture image selecting field484 of FIG. 19 is specified.

If determined that the all-focus texture image is selected in step S48,the CPU 210 irradiates the measuring object S with the illuminationlight from the illumination light output unit 130 according to the lightamount condition set in the first adjustment, and generates theall-focus texture image data of the measuring object S (step S49). Ifdetermined that the all-focus texture image is not selected in step S48,the CPU 210 proceeds to the processing of step S50.

The CPU 210 determines whether or not the HDR texture image is selectedin step S19 of the first adjustment of FIG. 25 by the user (step S50).The CPU 210 determines that the HDR texture image is selected when thecheck box 484 b of the texture image selecting field 484 of FIG. 19 isspecified.

If determined that the HDR texture image is selected in step S50, theCPU 210 irradiates the measuring object S with the illumination lightfrom the illumination light output unit 130 according to the lightamount condition set in the first adjustment, and generates the HDRtexture image data of the measuring object S (step S51). If theall-focus texture image data is generated in step S49, the CPU 210generates the HDR all-focus texture image data instead of the HDRtexture image data in step S51. If determined that the HDR texture imageis not selected in step S50, the CPU 210 proceeds to the processing ofstep S52.

The user can instruct the CPU 210 to display the texture image based onthe generated texture image data on the display section 400. The CPU 210determines whether or not the displaying of the texture image isinstructed (step S52). If determined that the displaying of the textureimage is not instructed in step S52, the CPU 210 proceeds to theprocessing of step S55. If determined that the displaying of the textureimage is instructed in step S52, the CPU 210 displays the texture imageon the display section 400 based on the generated texture image data(step S53).

The CPU 210 then determines whether or not the texture image isappropriate based on the instruction of the user (step S54). The userinstructs the CPU 210 whether or not the texture image is appropriate byviewing the texture image displayed on the display section 400.

If determined that the texture image is not appropriate in step S54, theCPU 210 returns to the processing of step S48. Thus, the processing ofsteps S48 to S54 are repeated until it is determined that the textureimage is appropriate. The user can cause the CPU 210 to generateappropriate texture image data by changing the type of texture image tobe selected.

If determined that the texture image is appropriate in step S54, the CPU210 generates the synthesized data (step S55). The synthesized data isgenerated by synthesizing the texture image data generated in step S47,step S49, or step S51, and the main stereoscopic shape data generated instep S43.

The CPU 210 then displays the synthesized image of the measuring objectS on the display section 400 based on the generated synthesized data(step S56). The CPU 210 thereafter executes measurement or analysis ofthe measurement position based on the instruction of the user (stepS57). The shape measurement processing is thereby terminated. Accordingto such shape measurement processing, the CPU 210 can executemeasurement or analysis of the measurement position on the synthesizedimage based on the instruction of the user.

In step S42, if the measuring object S is irradiated with themeasurement light from both light projecting units 110A, 110B, onepattern image corresponding to the measurement light from one lightprojecting unit 110A is acquired, and the other pattern imagecorresponding to the measurement light from the other light projectingunit 110B is acquired.

In step S43, one main stereoscopic shape data corresponding to themeasurement light from the one light projecting unit 110A is generated,and the other main stereoscopic shape data corresponding to themeasurement light from the other light projecting unit 110B isgenerated. The one main stereoscopic shape data and the other mainstereoscopic shape data are synthesized at an appropriate weighting togenerate one main stereoscopic shape data.

In steps S47, S49, S51, the texture image data of the measuring object Sis generated by irradiating the measuring object S with the illuminationlight from the illumination light output unit 130, but the presentinvention is not limited thereto. In steps S47, S49, S51, the textureimage data of the measuring object S may be generated by irradiating themeasuring object S with the measurement light from the light projectingunit 110. In this case, the shape measuring device 500 may not includethe illumination light output unit 130, and hence the shape measuringdevice 500 can be miniaturized. The manufacturing cost of the shapemeasuring device 500 can also be reduced.

In the shape measurement processing described above, whether or not theHDR image is selected is determined after determining whether or not theall-focus texture image is selected, but the present invention is notlimited thereto. Whether or not the all-focus texture image is selectedmay be determined after determining whether or not the HDR texture imageis selected.

In the shape measurement processing described above, the processing ofgenerating the texture image data (steps S46 to S54) are executed afterthe processing of generating the main stereoscopic shape data (steps S42to S45), but the present invention is not limited thereto. Either one ofthe processing of generating the texture image data or the processing ofgenerating the main stereoscopic shape data may be executed first, andparts of the processing of generating the texture image data and theprocessing of generating the main stereoscopic shape data may besimultaneously executed.

For example, the processing of generating the main stereoscopic shapedata (steps S42 to S45) may be carried out after the processing ofgenerating the texture image data (steps S46 to S54) is carried out. Inthis case as well, the CPU 210 can generate the synthesized data in theprocessing of step S55. Furthermore, in step S54, a part of theprocessing of generating the main stereoscopic shape data can beexecuted while the user is determining whether or not the texture imageis appropriate by viewing the texture image displayed on the displaysection 400. The shape measurement processing thus can be executedefficiently and in a short time.

If the processing of generating the texture image data is carried outbefore the processing of generating the main stereoscopic shape data,the upper end and the lower end of the dimension in the Z direction ofthe measuring object S can be calculated based on the sub-stereoscopicshape data. Therefore, the focus of the light receiving unit 120 can beautomatically adjusted to the center in the Z direction of the measuringobject S in the processing of generating the main stereoscopic shapedata. In this case, the accuracy of the main stereoscopic shape data canbe further enhanced.

If the processing of generating the main stereoscopic shape data iscarried out before the processing of generating the texture image dataas in the shape measurement processing of FIGS. 30 to 32, the upper endand the lower end of the dimension in the Z direction of the measuringobject S can be calculated based on the main stereoscopic shape data.Therefore, the moving range in the Z direction of the stage 140 withrespect to the light receiving unit 120 can be minimized and themovement interval can be appropriately set when generating the all-focustexture image data in the processing of generating the texture imagedata. The all-focus texture image data thus can be generated at highspeed.

(5) Effects

In the shape measuring device 500 according to the present embodiment,the main stereoscopic shape data indicating the stereoscopic shape ofthe measuring object S is generated at high accuracy by the triangulardistance measurement method. The all-focus texture image data isgenerated by synthesizing the texture image data of the measuring objectS when each portion of the measuring object S is positioned within therange of the depth of field of the light receiving unit 120. Thus, theall-focus texture image data clearly indicates the surface state of theentire surface of the measuring object S.

The synthesized data in which the main stereoscopic shape data and theall-focus texture image data are synthesized indicates the stereoscopicshape of the measuring object S measured at high accuracy and clearlyindicates the surface state of the measuring object S. The synthesizedimage based on the synthesized data is displayed on the display section400. As a result, the user can clearly observe the surface state of themeasuring object S while measuring the shape of the measuring object Sat high accuracy.

In the shape measuring device 500 according to the present embodiment,the light amount condition of the one measurement light and the othermeasurement light suited for generating the main stereoscopic shape dataand the light amount condition of the illumination light suited forgenerating the texture image data are individually set. The mainstereoscopic shape data thus can be generated at higher accuracy, andthe texture image data more clearly indicating the surface state of theentire surface of the measuring object S can be generated. As a result,the surface state of the measuring object S can be more clearly observedwhile measuring the shape of the measuring object S at higher accuracy.

[6] First Auxiliary Function of Focus Adjustment

(1) First Example of First Auxiliary Function of Focus Adjustment

The measuring object S is positioned within the range of the depth offield of the light receiving unit 120 by adjusting the focus of thelight receiving unit 120 in the second adjustment in the preparation ofthe shape measurement. The shape of the measuring object S thus can beaccurately measured. If the measuring object S is positioned near thecenter of the range of the depth of field of the light receiving unit120, that is, near the focus of the light receiving unit 120, the shapeof the measuring object S can be more accurately measured.

However, the image of the measuring object S displayed on the displaysection 400 hardly changes even if the measuring object S is moved inthe Z direction within the range of the depth of field by adjusting theZ stage 142. For example, assume the depth of field is 5 mm and thevisual field size is 25 mm×25 mm. In this case, the measuring object Sis observed as if at the focus position of the light receiving unit 120in the entire range of the depth of field of 5 mm. Thus, a shift ofabout a few mm is assumed to occur in the adjustment of the focus.

Thus, it is difficult to position the measuring object S near the focusof the light receiving unit 120. In the shape measuring device 500according to the present embodiment, a function of assisting thepositioning of the measuring object S near the focus of the lightreceiving unit 120 (hereinafter referred to as first auxiliary functionof focus adjustment) is provided.

FIGS. 33A to 33D and FIGS. 34A and 34B are views describing a firstexample of the first auxiliary function of the focus adjustment. FIGS.33A and 33C show states in which the measuring object S on the stage 140is irradiated with the illumination light from the illumination lightoutput unit 130. FIGS. 33B and 33D show images displayed on the displaysection 400 when the measuring object S is imaged by the light receivingunit 120 of FIGS. 33A and 33C, respectively. FIG. 34A shows an imagedisplayed on the display section 400 when the measuring object S isimaged by the light receiving unit 120. FIG. 34B shows a relationshipbetween the position of the measuring object S when seen from the Ydirection and the focus position.

When the user operates the focus guide display field 477 of FIG. 13, apredetermined pattern (also referred to as auxiliary pattern) AP set inadvance is displayed at a specific position set in advance on the imagedisplayed on the display section 400, as shown in FIGS. 33B and 33D. Inthis example, the auxiliary pattern AP is displayed at a specificposition such as the center, upper, lower, left, and right portions,four corners, and the like of the screen of the display section 400. Asshown in FIG. 34A, coordinates on the display section 400 where theauxiliary pattern AP is displayed are assumed as (x, y). The auxiliarypattern AP is a pattern displayed so as to overlap the image on thedisplay section 400. Thus, the auxiliary pattern AP does not move orchange even if the measuring object S of FIGS. 33A and 33C is moved orchanged.

The focus position of the light receiving unit 120 is known. In FIG.34B, the focus position is indicated with a thick solid line. The focusposition of the light receiving unit 120 exists on a plane perpendicularto the Z direction. The light projecting unit 110 irradiates lighthaving a predetermined pattern (hereinafter referred to as guidepattern) GP set in advance toward an intersection of a line segment inthe Z direction passing through a point on the measuring object Scorresponding to the coordinates (x, y) of the auxiliary pattern AP, andthe focus position of the light receiving unit 120.

The guide pattern GP is thereby projected onto the surface of themeasuring object S as shown in FIGS. 33A and 33C, and the guide patternGP is displayed on the image of the measuring object S of the displaysection 400 as shown in FIGS. 33B, 33D, and 34A. In this case, the CPU210 of FIG. 1 controls the light projecting unit 110 such that thepositions in the Y direction of the auxiliary pattern AP and the guidepattern GP become the same.

According to such a configuration, when the surface of the measuringobject S is at the focus position of the light receiving unit 120, theguide pattern GP is displayed at coordinates equal to the coordinates(x, y) of the auxiliary pattern AP. In other words, the guide pattern GPand the auxiliary pattern AP are displayed in an overlapping manner.

When the surface of the measuring object S is not at the focus positionof the light receiving unit 120, the guide pattern GP is displayed atcoordinates (x′, y) different from the coordinates (x, y) of theauxiliary pattern AP. The distance between the position x and theposition x′ is proportional to the distance in the Z direction betweenthe focus position of the light receiving unit 120 and the position ofthe surface of the measuring object S. Therefore, when the measuringobject S is moved in the Z direction, the guide pattern GP does not movein the Y direction but moves in the X direction.

In the example of FIG. 33A, the position of the surface of the measuringobject S do not coincide with the focus position of the light receivingunit 120. Therefore, the guide pattern GP and the auxiliary pattern APare not overlapped on the display section 400, as shown in FIG. 33B.

As shown in FIG. 33C, the guide pattern GP is moved in the X directionby moving the stage 140 in the Z direction. The user can move the stage140 in the Z direction so that the guide pattern GP approaches theauxiliary pattern AP while viewing the auxiliary pattern AP and theguide pattern GP displayed on the display section 400. As shown in FIG.33D, the user can easily make the position of the surface of themeasuring object S coincide with the focus position of the lightreceiving unit 120 by adjusting the stage 140 so that the guide patternGP and the auxiliary pattern AP overlap.

For example, assume the visual field size is 25 mm×25 mm, the number ofpixels of the visual field in the X direction of the light receivingunit 120 is 1024 pixels, and the shift of the guide pattern GP and theauxiliary pattern AP can be recognized in units of one pixel. In thiscase, the size of one pixel is 25 mm÷1024≈24 μm. In other words, theshift between the guide pattern GP and the auxiliary pattern AP can berecognized in units of 24 μM. If the distance d of such shift isconverted to height h, assuming that the angle α of FIG. 6 is, forexample, 45 degrees, the height h is 24÷tan 45°=24 μm. Therefore, thefocus of the light receiving unit 120 can be adjusted at very highaccuracy by the first auxiliary function of the focus adjustment.

In FIGS. 33A to 33D, the light projecting unit 110 is illustrated in asimplified manner. The light projecting unit 110 is a projection patternoptical system that has a function of irradiating the measuring object Swith the measurement light, which has a periodic pattern, at the time ofexecuting the shape measurement processing. The light projecting unit110 irradiates the measuring object S with the light generated by thepattern generating portion 112 (FIG. 2), representatively DMD, LCD, orthe like.

A light source for the guide pattern GP is not required to be separatelyarranged in the measuring section 100 by projecting the guide pattern GPon the surface of the measuring object S using such a projection patternoptical system. The guide pattern GP having an arbitrary shape can beprojected onto the surface of the measuring object S. Furthermore, theprojection position of the guide pattern GP can be changed such that thelight receiving unit 120 is focused on the portion of the measuringobject S specified by the user within the irradiation range of the lightprojecting unit 110. The details will be described later.

(2) Second Example of First Auxiliary Function of Focus Adjustment

FIGS. 35A to 35D are views describing a second example of the firstauxiliary function of the focus adjustment. FIGS. 35A and 35C showstates in which the measuring object S on the stage 140 is irradiatedwith the illumination light from the illumination light output unit 130.FIGS. 35B and 35D show images displayed on the display section 400 whenthe measuring object S is imaged by the light receiving unit 120 ofFIGS. 35A and 35C.

In this example, the auxiliary pattern AP is displayed at a position onthe image on the display section 400 specified by the user. In otherwords, the user can specify the coordinates (x, y) of FIG. 34A where theauxiliary pattern AP is displayed. As shown in FIGS. 35A and 35C, themeasuring object S is irradiated with the light having the guide patternGP from the light projecting unit 110. In this case, the CPU 210 of FIG.1 calculates the coordinates (x, y) of the AP based on the specificationof the user, and controls the light projecting unit 110 so that thelight is irradiated toward the coordinates (x, y) on the focus positionof FIG. 34B. The guide pattern GP is thereby projected onto the surfaceof the measuring object S, and the guide pattern GP is displayed on theimage of the measuring object S of the display section 400.

In the example of FIG. 35A, the position of the surface of the measuringobject S do not coincide with the focus position of the light receivingunit 120. Therefore, the guide pattern GP and the auxiliary pattern APare not overlapped on the display section 400, as shown in FIG. 35B.

As shown in FIG. 35C, the user can move the stage 140 in the Z directionso that the guide pattern GP approaches the auxiliary pattern AP whileviewing the auxiliary pattern AP and the guide pattern GP displayed onthe display section 400. As shown in FIG. 35D, the user can easily makethe position of the surface of the measuring object S coincide with thefocus position of the light receiving unit 120 by adjusting the stage140 so that the guide pattern GP and the auxiliary pattern AP overlap.

FIGS. 36A and 36B are views showing an example of the GUI for specifyingthe position to display the auxiliary pattern AP. As shown in FIG. 36A,the user can operate the operation unit 250 of the PC 200 of FIG. 1 toplace a cursor C at an arbitrary position on the image of the displaysection 400.

When the relevant position is selected in this state, the user candisplay the auxiliary pattern AP at the position of the cursor C anddisplay the guide pattern GP, as shown in FIG. 36B. Thus, in thisexample, the user can display the auxiliary pattern AP at an arbitraryposition. The user thus can focus the light receiving unit 120 to thearbitrary position on the surface of the measuring object S.

(3) Third Example of First Auxiliary Function of Focus Adjustment

FIGS. 37A to 37D are views describing a third example of the firstauxiliary function of the focus adjustment. FIGS. 37A and 37C showstates in which the measuring object S on the stage 140 is irradiatedwith the illumination light from the illumination light output unit 130.FIGS. 37B and 37D show images displayed on the display section 400 whenthe measuring object S is imaged by the light receiving unit 120 ofFIGS. 37A and 37C.

Similarly to the first and second examples of the first auxiliaryfunction of the focus adjustment, the auxiliary pattern AP is displayedon the image of the display section 400. The position where theauxiliary pattern AP is displayed may be set in advance or may bespecified by the user. In this example, the auxiliary pattern APincludes a rectangular frame. The dimension in the X direction of therectangular frame of the auxiliary pattern AP indicates the measurablerange in the Z direction of the light receiving unit 120.

As shown in FIGS. 37A and 37C, the measuring object S is irradiated withthe light having the guide pattern GP from the light projecting unit110. The guide pattern GP is thereby projected onto the surface of themeasuring object S, and the guide pattern GP is displayed on the imageof the measuring object S displayed on the display section 400. Theguide pattern GP has a rectangular shape, and the dimension of the guidepattern GP is smaller than the dimension of the auxiliary pattern AP.According to such a configuration, the surface of the measuring object Sis included within the measurable range in the Z direction of the lightreceiving unit 120 when the guide pattern GP is positioned within therectangular frame of the auxiliary pattern AP.

In the example of FIG. 37A, the surface of the measuring object S is notpositioned within the measurable range in the Z direction of the lightreceiving unit 120. Therefore, as shown in FIG. 37B, the guide patternGP is not positioned within the rectangular frame of the auxiliarypattern AP on the display section 400.

As shown in FIG. 37C, the user can move the stage 140 in the Z directionso that the guide pattern GP approaches the auxiliary pattern AP whileviewing the auxiliary pattern AP and the guide pattern GP displayed onthe display section 400. As shown in FIG. 37D, the user can easilyposition the surface of the measuring object S within the measurablerange in the Z direction of the light receiving unit 120 by adjustingthe stage 140 so that the guide pattern GP is positioned within therectangular frame of the auxiliary pattern AP.

Therefore, the position of the surface of the measuring object S is notrequired to coincide with the focus position of the light receiving unit120, and the dimension in the X direction of the auxiliary pattern APmay have a spread range corresponding to the measurable range in the Zdirection of the light receiving unit 120 when positioning the measuringobject S within the measurable range in the Z direction of the lightreceiving unit 120. In this case, the measuring object S can be moreeasily positioned within the measurable range in the Z direction of thelight receiving unit 120.

(4) Fourth Example of First Auxiliary Function of Focus Adjustment

FIGS. 38A to 38D are views describing a fourth example of the firstauxiliary function of the focus adjustment. FIGS. 38A and 38C showstates in which the measuring object S on the stage 140 is irradiatedwith the illumination light from the illumination light output unit 130.The measuring object S of FIGS. 38A and 38C have a plurality of uppersurfaces of different heights. FIGS. 38B and 38D show images displayedon the display section 40 when the measuring object S is imaged by thelight receiving unit 120 of FIGS. 38A and 38C.

In this example, the auxiliary pattern AP is displayed at a plurality ofpositions on the image on the display section 400 specified by the user.Therefore, the user can specify the auxiliary pattern AP on each of theplurality of upper surfaces of different heights of the measuring objectS displayed on the display section 400. Each auxiliary pattern APincludes a rectangular frame. The dimension in the X direction of therectangular frame of each auxiliary pattern AP indicates the measurablerange in the Z direction of the light receiving unit 120.

As shown in FIGS. 38A and 38C, the measuring object S is irradiated withthe light having a plurality of guide patterns GP from the lightprojecting unit 110. The plurality of guide patterns GP are therebyprojected onto the surface of the measuring object S, and the pluralityof guide patterns GP are displayed on the image of the measuring objectS displayed on the display section 400. The plurality of guide patternsGP respectively correspond to the plurality of auxiliary patterns AP.Each guide pattern GP has a rectangular shape, and the dimension of eachguide pattern GP is smaller than the dimension of each auxiliary patternAP. According to such a configuration, the plurality of upper surfacesof the measuring object S are positioned within the measurable range inthe Z direction of the light receiving unit 120 when each guide patternGP is positioned within the rectangular frame of each auxiliary patternAP.

In the example of FIG. 38A, the plurality of upper surfaces of themeasuring object S are not included in the measurable range in the Zdirection of the light receiving unit 120. Therefore, as shown in FIG.38B, each guide pattern GP is not positioned within the rectangularframe of each auxiliary pattern AP on the display section 400.

As shown in FIG. 38C, the user can move the stage 140 in the Z directionso that each guide pattern GP approaches each auxiliary pattern AP whileviewing the auxiliary patterns AP and the guide patterns GP displayed onthe display section 400. As shown in FIG. 38D, the user can easilyposition the plurality of upper surfaces of the measuring object Swithin the range of the depth of field of the light receiving unit 120by adjusting the stage 140 so that each guide pattern GP is positionedwithin the rectangular frame of each auxiliary pattern AP.

Therefore, when positioning a plurality of positions in the measuringobject S within the measurable range in the Z direction of the lightreceiving unit 120, a plurality of auxiliary patterns AP correspondingto such positions may be specified. Thus, even if a plurality ofportions of the measuring object S are at a plurality of differentpositions in the Z direction, each of the plurality of portions of themeasuring object S can be accurately and easily positioned at the focusof the light receiving unit 120. The dimension in the X direction ofeach auxiliary pattern AP may have a spread range corresponding to themeasurable range in the Z direction of the light receiving unit 120. Inthis case, the measuring object S can be easily positioned within themeasurable range in the Z direction of the light receiving unit 120.

(5) Fifth Example of First Auxiliary Function of Focus Adjustment

FIGS. 39A to 39D and FIGS. 40A and 40B are views describing a fifthexample of the first auxiliary function of the focus adjustment. FIGS.39A and 39C show states in which the measuring object S on the stage 140is irradiated with the illumination light from the illumination lightoutput unit 130. FIGS. 39B and 39D show images displayed on the displaysection 400 when the measuring object S is imaged by the light receivingunit 120 of FIGS. 39A and 39C. FIG. 40A shows an image displayed on thedisplay section 400 when the measuring object S is imaged by the lightreceiving unit 120. FIG. 40B shows a relationship between the positionof the measuring object S when seen from the Y direction and the focusposition. In this example, a plurality of light projecting units 110A,110B are used for the first auxiliary function of the focus adjustment.

In FIG. 40B, the focus position is indicated with a thick solid line.When the user operates the focus guide display field 477 of FIG. 13, themeasuring object S is irradiated with the light having the guide patternGP from the one light projecting unit 110A, as shown in FIGS. 39A, 39C,and 40B. Thus, the guide pattern GP is projected onto the surface of themeasuring object S as shown in FIGS. 39A and 39C, and the guide patternGP is displayed on the image of the measuring object S of the displaysection 400 as shown in FIGS. 39B, 39D, and 40A. In this case, the CPU210 of FIG. 1 controls the one light projecting unit 110A so that thelight is irradiated toward the coordinates (x, on the focus positionwith respect to an arbitrary coordinates (x, y) set in advance.

Similarly, the measuring object S is irradiated with the light havingthe auxiliary pattern AP from the other light projecting unit 110B, asshown in FIGS. 39A, 39C, and 40B. Thus, the auxiliary pattern AP isprojected onto the surface of the measuring object S as shown in FIGS.39A and 39C, and the auxiliary pattern AP is displayed on the image ofthe measuring object S of the display section 400 as shown in FIGS. 39B,39D, and 40A. In this case, the CPU 210 controls the other lightprojecting unit 110B so that the light is irradiated toward thecoordinates (x, y) on the focus position with respect to an arbitrarycoordinates (x, y) set in advance. The light projecting units 110A, 110Bare controlled such that the positions in the Y direction of theauxiliary pattern AP and the guide pattern GP are the same.

Differently from the first to fourth examples of the first auxiliaryfunction of the focus adjustment, the auxiliary pattern AP in thisexample is not a pattern displayed to overlap the image on the displaysection 400. Thus, the auxiliary pattern AP moves or changes when themeasuring object S of FIGS. 39A and 39C is moved or changed.

According to such a configuration, when the surface of the measuringobject S is at the focus position of the light receiving unit 120, theguide pattern GP and the auxiliary pattern AP are displayed at the samecoordinates as the coordinates (x, y). In other words, the guide patternGP and the auxiliary pattern AP are displayed so as to overlap.

When the surface of the measuring object S is not at the focus positionof the light receiving unit 120, the guide pattern GP is displayed atcoordinates (x′, y) different from the coordinates (x, y), and theauxiliary pattern AP is displayed at coordinates (x″, different from thecoordinates (x, y) and the coordinates (x′, y). The distance between theposition x′ and the position x″ is proportional to the distance in the Zdirection between the focus position of the light receiving unit 120 andthe position of the surface of the measuring object S. Therefore, whenthe measuring object S is moved in the Z direction, the guide pattern GPand the auxiliary pattern AP are not moved in the Y direction, and aremoved in opposite directions to each other in the X direction.

In the example of FIG. 39A, the position of the surface of the measuringobject S do not coincide with the focus position of the light receivingunit 120. Therefore, the guide pattern GP and the auxiliary pattern APare not overlapped on the measuring object S and the display section400, as shown in FIG. 39B.

As shown in FIG. 39C, the guide pattern GP and the auxiliary pattern APare moved in opposite directions to each other in the X direction bymoving the stage 140 in the Z direction. The user can move the stage 140in the Z direction so that the guide pattern GP and the auxiliarypattern AP approach each other while viewing the auxiliary pattern APand the guide pattern GP projected onto the surface of the measuringobject S or displayed on the display section 400. As shown in FIG. 39D,the user can easily make the position of the surface of the measuringobject S coincide with the focus position of the light receiving unit120 by adjusting the stage 140 so that the guide pattern GP and theauxiliary pattern AP overlap.

Therefore, in this example, the auxiliary pattern AP and the guidepattern GP are displayed not only on the display section 400 but also onthe measuring object S. Therefore, even in a situation where the displaysection 400 cannot be viewed, the user can adjust the focus of the lightreceiving unit 120 while viewing the auxiliary pattern AP and the guidepattern GP displayed on the measuring object S. The operability of themeasuring section 100 of FIG. 1 thus can be enhanced.

In this example as well, the portion of the measuring object S on whichthe user desires to focus the light receiving unit 120 on the displaysection 400 can be specified. In this case, when the focus of the lightreceiving unit 120 is at the portion specified by the user, theirradiation position of the measurement light by each light projectingunit 110A, 110B is changed such that the guide pattern GP projected ontothe measuring object S by the one light projecting unit 110A and theauxiliary pattern AP projected onto the measuring object S by the otherlight projecting unit 110B overlap.

In addition to the guide pattern GP or the auxiliary pattern AP, thelight having a frame pattern indicating the visual field range of thelight receiving unit 120 may be irradiated from at least one of thelight projecting units 110A, 110B. FIGS. 41A and 41B and FIGS. 42A and42B are views showing examples in which the measuring object S isirradiated with the light having the frame pattern from the lightprojecting unit 110A.

As shown in FIGS. 41A and 41B, the measuring object S is irradiated withthe light having the frame pattern FP from the one light projecting unit110A. The frame pattern FP is thereby projected onto the surface of themeasuring object S. The frame pattern FP indicates the visual fieldrange including the guide pattern GP as the center.

In the examples of FIGS. 41A and 41B and FIGS. 42A and 42B, the framepattern FP is four L-shaped patterns indicating the four corners of thevisual field size. The frame pattern FP may be four cross-shapedpatterns or four dot-shaped patterns indicating the four corners of thevisual field range. Alternatively, the frame pattern FP may be arectangular pattern indicating the visual field range.

As shown in FIGS. 42A and 42B, the user can make the position of thesurface of the measuring object S coincide with the focus position ofthe light receiving unit 120 by adjusting the stage 140 so that theguide pattern GP and the auxiliary pattern AP overlap. The rangesurrounded by the frame pattern FP in this state becomes the visualfield range of the light receiving unit 120.

In this example, therefore, the frame pattern FP is projected onto themeasuring object S. The user thus can easily recognize the visual fieldrange of the light receiving unit 120 displayed on the display section400 even in a situation where the display section 400 cannot be viewed.The operability of the measuring section 100 thus can be furtherenhanced.

Furthermore, in this example, the light receiving unit 120 has thedigital zoom function. FIG. 43 is a view showing the frame pattern FPcorresponding to the digital zoom function. As shown in FIG. 43, thevisual field range after the enlargement can be projected onto thesurface of the measuring object S by the frame pattern FP beforeactually enlarging and observing the measuring object S with the digitalzoom function of the light receiving unit 120. In FIG. 43, the visualfield range when the digital zoom function is not used is indicated withthe frame pattern FP of dotted lines, and the visual field range afterthe enlargement when the digital zoom function is used is indicated withthe frame pattern FP of solid lines.

Therefore, the user can recognize the visual field range after theenlargement before actually enlarging and observing the measuring objectS with the digital zoom function of the light receiving unit 120. Theoperability of the measuring section 100 thus can be further enhanced.

As a variant of the fifth example of the first auxiliary function of thefocus adjustment, the measuring section 100 may include an adjustmentlight source for the first auxiliary function of the focus adjustment.In this case, the light projecting unit 110A and the adjustment lightsource are used for the first auxiliary function of the focusadjustment. The measuring section 100 may not include the other lightprojecting unit 110B. Since the adjustment light source is not used forthe measurement of the shape of the measuring object S, a light sourcehaving a simple configuration may be adopted. In this example, theadjustment light source is, for example, a laser pointer.

The measuring object S is irradiated with the light having the guidepattern GP from the light projecting unit 110A. The guide pattern GP isthereby projected onto the surface of the measuring object S, and theguide pattern GP is displayed on the image of the measuring object S ofthe display section 400. The measuring object S is irradiated with thelight having the auxiliary pattern AP from the adjustment light source.The auxiliary pattern AP is thereby projected onto the surface of themeasuring object S, and the auxiliary pattern AP is displayed on theimage of the measuring object S of the display section 400.

The user adjusts the stage 140 so that the guide pattern GP and theauxiliary pattern AP overlap while viewing the auxiliary pattern AP andthe guide pattern GP projected onto the surface of the measuring objectS or displayed on the display section 400 to easily make the position ofthe surface of the measuring object S coincide with the focus positionof the light receiving unit 120.

The adjustment light source may be arranged at any portion of themeasuring section 100 as long as light can be irradiated toward themeasuring object S from a direction different from the irradiatingdirection of the light from the light projecting unit 110A toward themeasuring object S. For example, the adjustment light source may bearranged in the light receiving unit 120, and the measuring object S maybe irradiated with the light from substantially directly above themeasuring object S. Alternatively, if the measuring object S transmitslight, the adjustment light source may be arranged on the stage 140 andthe measuring object S may be irradiated with the light from below themeasuring object S.

(6) Variant of First Auxiliary Function of Focus Adjustment

In the first to fifth examples of the first auxiliary function of thefocus adjustment, the user manually adjusts the focus of the lightreceiving unit 120 so that the guide pattern GP and the auxiliarypattern AP overlap or so that the guide pattern GP is positioned withinthe rectangular frame of the auxiliary pattern AP, but the presentinvention is not limited thereto. The focus of the light receiving unit120 may be automatically adjusted without the operation of the user byhaving the CPU 210 of FIG. 1 drive the stage drive unit 146 of FIG. 1based on a distance between the guide pattern GP and the auxiliarypattern AP.

Alternatively, the CPU 210 may determine whether to move the stage 140in one direction or the other direction in the Z direction to approachthe guide pattern GP and the auxiliary pattern AP, and display such adirection on the display section 400, for example. The CPU 210 maydetermine an extent of focusing by the degree of overlapping of theguide pattern GP and the auxiliary pattern AP, and numerically orvisually display the extent of focusing on the display section 400. Thevisual display of the extent of focusing includes display by a bar, forexample. As other visual displays of the extent of focusing, the hue ofthe guide pattern GP and the auxiliary pattern AP may be changed whenthe guide pattern GP and the auxiliary pattern AP are completelyoverlapped.

(7) Shapes of Auxiliary Pattern and Guide Pattern

In the first, second, and fifth examples of the first auxiliary functionof the focus adjustment, the guide pattern GP and the auxiliary patternAP are set such that the position of the surface of the measuring objectS coincide with the focus position of the light receiving unit 120 whenthe guide pattern GP and the auxiliary pattern AP are overlapped. In thethird and fourth examples of the first auxiliary function of the focusadjustment, the guide pattern GP and the auxiliary pattern AP are setsuch that the measuring object S is positioned within the measurablerange in the Z direction of the light receiving unit 120 when the guidepattern GP is positioned within the rectangular frame of the auxiliarypattern AP.

Without being limited thereto, the guide pattern GP and the auxiliarypattern AP may be set such that the position of the surface of themeasuring object S coincides with the focus position of the lightreceiving unit 120 or the measuring object S is positioned within themeasurable range in the Z direction of the light receiving unit 120 whenthe guide pattern GP and the auxiliary pattern AP are in a specificpositional relationship. The specific positional relationship is arelationship in which the user can recognize that the focus of the lightreceiving unit 120 coincides with the relevant position by visuallychecking the relative positional relationship between the guide patternGP and the auxiliary pattern AP, and differs from the positionalrelationship between the guide pattern GP and the auxiliary pattern APwhen the focus of the light receiving unit 120 does not coincide.

FIGS. 44A to 44E are views showing examples of the shapes of theauxiliary pattern AP and the guide pattern GP.

In FIGS. 44A to 44E, the auxiliary pattern AP is shown with a hatchingpattern and the guide pattern GP is shown with a dot pattern.

In the example of FIG. 44A, the auxiliary pattern AP and the guidepattern GP have a cross-shape. In the example of FIG. 44B, the auxiliarypattern AP and the guide pattern GP have a circular ring shape. In theexample of FIG. 44C, the auxiliary pattern AP and the guide pattern GPhave a rectangular shape. In the example of FIG. 44D, the auxiliarypattern AP and the guide pattern GP have an X-shape. In the example ofFIG. 44E, the auxiliary pattern AP and the guide pattern GP have anI-shape.

Therefore, in the examples of FIGS. 44A to 44E, the auxiliary pattern APand the guide pattern GP have the same shapes. In such examples, theposition of the surface of the measuring object S coincides with thefocus position of the light receiving unit 120 when the guide pattern GPand the auxiliary pattern AP are overlapped. The auxiliary pattern APand the guide pattern GP in the first, second, and fifth examples of thefirst auxiliary function of the focus adjustment are the auxiliarypattern AP and the guide pattern GP of FIG. 44A.

FIGS. 45A to 45E are views showing other examples of the shapes of theauxiliary pattern AP and the guide pattern GP. In FIGS. 45A to 45E, theauxiliary pattern AP is shown with a hatching pattern and the guidepattern GP is shown with a dot pattern.

In the example of FIG. 45A, the auxiliary pattern AP has a shape of halfof the cross-shape, and the guide pattern GP has a shape of the otherhalf of the cross-shape. In this example, the position of the surface ofthe measuring object S coincides with the focus position of the lightreceiving unit 120 when the guide pattern GP and the auxiliary patternAP are combined to form the cross-shape.

In the example of FIG. 45B, the auxiliary pattern AP has a shape of halfof the circular ring shape, and the guide pattern GP has a shape of theother half of the circular ring shape. In this example, the position ofthe surface of the measuring object S coincides with the focus positionof the light receiving unit 120 when the guide pattern GP and theauxiliary pattern AP are combined to form the circular ring shape.

In the example of FIG. 45C, the auxiliary pattern AP has a shape ofportions of a shape of characters “FP”, and the guide pattern GP has ashape of the other portions of the shape of characters “FP”. In thisexample, the position of the surface of the measuring object S coincideswith the focus position of the light receiving unit 120 when the guidepattern GP and the auxiliary pattern AP are combined to form the shapeof the characters “FP”.

In the example of FIG. 45D, the auxiliary pattern AP has a shape of oneportion of an asterisk shape, and the guide pattern GP has a shape ofthe other portion of the asterisk shape. In this example, the positionof the surface of the measuring object S coincides with the focusposition of the light receiving unit 120 when the guide pattern GP andthe auxiliary pattern AP are combined to form the asterisk shape.

In the example of FIG. 45E, the auxiliary pattern AP has a shape ofportions of a plurality of bar shapes extending in the up and downdirection and having different lengths, and the guide pattern GP has ashape of the other portions of the plurality of bar shapes extending inthe up and down direction and having different lengths. In this example,the position of the surface of the measuring object S coincides with thefocus position of the light receiving unit 120 when the guide pattern GPand the auxiliary pattern AP are combined to form the plurality of barshapes extending in the up and down direction and having differentlengths.

FIGS. 46A to 46C are views showing other further examples of the shapesof the auxiliary pattern AP and the guide pattern GP. In FIGS. 46A to46C, the auxiliary pattern AP is shown with a hatching pattern and theguide pattern GP is shown with a dot pattern.

In the example of FIG. 46A, the auxiliary pattern AP includes arectangular frame, and the guide pattern GP has a rectangular shapesmaller than the dimension of the auxiliary pattern AP. The dimension inthe horizontal direction (X direction of FIG. 2) of the auxiliarypattern AP indicates the measurable range in the Z direction of thelight receiving unit 120 of FIG. 1. In this example, the display portionof the guide pattern GP on the measuring object S is positioned withinthe measurable range in the Z direction of the light receiving unit 120when the guide pattern GP is positioned within the rectangular frame ofthe auxiliary pattern AP.

The auxiliary pattern AP and the guide pattern GP in the third andfourth examples of the first auxiliary function of the focus adjustmentare the auxiliary pattern AP and the guide pattern GP of FIG. 46A.

In the example of FIG. 46B, the auxiliary pattern AP includes two angledbrackets facing each other in the horizontal direction. The guidepattern GP has a shape in which a rectangular portion smaller than thedimension of the auxiliary pattern AP and a cross-shaped portion arecombined. The spacing in the horizontal direction of the two angledbrackets of the auxiliary pattern AP indicates the measurable range inthe Z direction of the light receiving unit 120. In this example, thedisplay portion of the guide pattern GP on the measuring object S ispositioned within the measurable range in the Z direction of the lightreceiving unit 120 when the rectangular portion of the guide pattern GPis positioned between the two angled brackets of the auxiliary patternAP.

In the example of FIG. 46C, the auxiliary pattern AP includes twobar-shaped portions extending in the up and down direction and beinglined in the horizontal direction. The guide pattern GP has a bar shapeextending in the up and down direction and being smaller than thedimension of the auxiliary pattern AP. The spacing in the horizontaldirection of the two bar-shaped portions of the auxiliary pattern APindicates the measurable range in the Z direction of the light receivingunit 120. In this example, the display portion of the guide pattern GPon the measuring object S is positioned within the measurable range inthe Z direction of the light receiving unit 120 when the guide patternGP is positioned between the two bar-shaped portions of the auxiliarypattern AP.

(8) Effects by Illumination Light

In the first to fifth examples of the first auxiliary function of thefocus adjustment, the measuring object S is irradiated with theillumination light from the illumination light source 320 of the controlsection 300 of FIG. 1 through the illumination light output unit 130.Hereinafter, the effect by the illumination light will be described bycomparing an example in which the measuring object S is not irradiatedwith the illumination light and an example in which the measuring objectS is irradiated with the illumination light.

The pattern generating portion 112 of FIG. 2 generates the guide patternGP by forming the bright portion and the dark portion in the light to beemitted from the light projecting unit 110. The guide pattern GP can beformed by either the bright portion or the dark portion. The guidepattern GP formed by the bright portion is referred to as a white guidepattern GP, and the guide pattern GP formed by the dark portion isreferred to as a black guide pattern GP.

FIGS. 47A to 47C are views showing the measuring object S displayed onthe display section 400 when the measuring object S is not irradiatedwith the illumination light. FIG. 47A shows the measuring object S in astate where the uniform light (light including only bright portion) isirradiated from the light projecting unit 110 as a reference example. Asshown in FIG. 47A, when the measuring object S is irradiated with theuniform light from the light projecting unit 110, shade is formed at apart of the measuring object S.

FIG. 47B shows the measuring object S in a state irradiated with thelight having the white guide pattern GP from the light projecting unit110. As shown in FIG. 47B, the white guide pattern GP is displayed onthe display section 400 when the measuring object S is not irradiatedwith the illumination light. However, since the measuring object S isnot illuminated, the measuring object S is not displayed on the displaysection 400. Thus, it is difficult to adjust the focus of the lightreceiving unit 120.

FIG. 47C shows the measuring object S in a state irradiated with thelight having the black guide pattern GP from the light projecting unit110. As shown in FIG. 47C, the black guide pattern GP is displayed onthe display section 400 when the measuring object S is not irradiatedwith the illumination light. Since a part of the measuring object S isilluminated by the bright portion of the light from the light projectingunit 110, the user can recognize the position of the measuring object S.However, shade is formed at a part of the measuring object S, and thusthe black guide pattern GP is embedded in the shade when the black guidepattern GP and the shade are overlapped, whereby it is difficult torecognize the accurate position of the black guide pattern GP.

FIGS. 48A to 48C are views showing the measuring object S displayed onthe display section 400 when the measuring object S is irradiated withthe illumination light. FIG. 48A shows the measuring object S in a stateirradiated with the illumination light from the illumination lightoutput unit 130 as a reference example. As shown in FIG. 48A, when themeasuring object S is irradiated with the illumination light from theillumination light output unit 130, shade is hardly formed on themeasuring object S.

FIG. 48B shows the measuring object S in a state irradiated with thelight having the white guide pattern GP from the light projecting unit110. As shown in FIG. 48B, when the measuring object S is irradiatedwith the illumination light adjusted to the appropriate brightness, thewhite guide pattern GP is displayed together with the measuring object Son the display section 400. Since the shade is hardly formed on themeasuring object S, the positions of the measuring object S and thewhite guide pattern GP can be accurately recognized.

FIG. 48C shows the measuring object S in a state irradiated with thelight having the black guide pattern GP from the light projecting unit110. As shown in FIG. 48C, when the measuring object S is irradiatedwith the illumination light adjusted to the appropriate brightness, theblack guide pattern GP is displayed together with the measuring object Son the display section 400. Since the shade is hardly formed on themeasuring object S, the positions of the measuring object S and theblack guide pattern GP can be accurately recognized.

Therefore, the illumination light is emitted at an angle substantiallyequal to that of the optical axis of the light receiving unit 120,whereby the measuring object S is illuminated while suppressing theformation of shade. The user thus can reliably recognize the image ofthe measuring object S, as well as the auxiliary pattern AP and theguide pattern GP. As a result, the measuring object S can be moreaccurately positioned at the focus of the light receiving unit 120.

In particular, when specifying the portion of the measuring object S onwhich the user desires to focus the light receiving unit 120 on thedisplay section 400, it is difficult for the user to appropriatelyspecify the portion originally desired to be focused in a state wherethe image of the measuring object S is dark and is not displayed, asshown in FIG. 47B. Therefore, the user can easily specify the portiondesired to be focused by illuminating the illumination light on theentire measuring object S from the illumination light output unit 130and displaying the image.

In the first to fourth examples of the first auxiliary function of thefocus adjustment, the intensity of the illumination light when themeasuring object S is irradiated with the measurement light having theguide pattern GP is set to be smaller than the intensity of theillumination light when the measuring object S is not irradiated withthe measurement light having the guide pattern GP.

According to such a configuration, even when the measuring object S issimultaneously irradiated with the illumination light and themeasurement light having the guide pattern GP, the guide pattern GPprojected onto the surface of the measuring object S can be recognizedsince the intensity of the illumination light is small. The user thuscan reliably recognize the image of the measuring object S and the guidepattern GP displayed on the display section 400. As a result, thesurface of the measuring object S can be reliably positioned at thefocus of the light receiving unit 120.

Similarly, in the fifth example of the first auxiliary function of thefocus adjustment, the intensity of the illumination light when themeasuring object S is irradiated with the measurement light having theguide pattern GP and the auxiliary pattern AP is set to be smaller thanthe intensity of the illumination light when the measuring object S isnot irradiated with the measurement light having the guide pattern GPand the auxiliary pattern AP.

According to such a configuration, even when the measuring object S issimultaneously irradiated with the illumination light and themeasurement light having the guide pattern GP and the auxiliary patternAP, the guide pattern GP and the auxiliary pattern AP projected onto thesurface of the measuring object S can be recognized since the intensityof the illumination light is small. The user thus can reliably recognizethe image of the measuring object S as well as the guide pattern GP andthe auxiliary pattern AP displayed on the display section 400. As aresult, the surface of the measuring object S can be reliably positionedat the focus of the light receiving unit 120.

(9) Effect

In the shape measuring device 500 according to the present embodiment,the stage 140 is moved in the Z direction so that the auxiliary patternAP, which is displayed on the display section 400 or projected onto thesurface of the measuring object S by the other light projecting unit110B, and the guide pattern GP, which is projected onto the surface ofthe measuring object S by the one light projecting unit 110A, areoverlapped. The user thus can position the surface of the measuringobject S at the focus of the light receiving unit 120. As a result, themeasuring object S can be accurately and easily positioned at the focusof the light receiving unit 120 in the shape measurement processing ofthe measuring object S.

In particular, the portion where the user desires the most to performthe measurement at high accuracy can be focused on by the userspecifying the portion of the measuring object S desired to be focusedon the display section 400, and displaying or projecting the auxiliarypattern AP on the specified portion. In this case, the shape measuringdevice 500 may be configured so that a plurality of portions of themeasuring object S the user desires to focus on can be specified.

In this case, the user can adjust, while visually checking, theauxiliary pattern AP and the guide pattern GP corresponding to therespective portions so that a plurality of specified portions of themeasuring object S can be focused on in a balanced manner while movingthe stage 140. The user can also check whether or not all the specifiedportions are included in the measurable range in the Z direction of thelight receiving unit 120 by displaying the measurable range with theauxiliary pattern AP.

The stage 140 may be moved by the user operating the stage operationunit 145, or may be automatically moved by having the CPU 210 drive thestage drive unit 146.

[7] Second Auxiliary Function of Focus Adjustment

(1) First Example of Second Auxiliary Function of Focus Adjustment

A second auxiliary function of the focus adjustment different from thefirst auxiliary function of the focus adjustment will now be described.FIGS. 49A and 49B are views describing a first example of the secondauxiliary function of the focus adjustment. In the examples of FIGS. 49Aand 49B, a plurality of measuring objects SA, SB, SC, SD havingdifferent heights from each other are mounted on the stage 140 ofFIG. 1. Still images or live images of the measuring objects SA to SDare displayed on the display section 400 based on the light receivingsignal output by the light receiving unit 120 of FIG. 1.

As shown in FIG. 49A, the user can place the cursor C at an arbitraryposition on the image of the display section 400 by operating theoperation unit 250 of the PC 200 of FIG. 1. In the example of FIG. 49A,the cursor C is placed at the position on the measuring object SAdisplayed on the display section 400. When the relevant position isselected in this state, the user can display a marker M at the positionon the measuring object SA specified with the cursor C on the displaysection 400, as shown in FIG. 49B.

After the marker M is displayed, at least the portion of the measuringobject SA corresponding to the position where the marker M is displayedand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110. The height of theportion of the measuring object SA corresponding to the position wherethe marker M is displayed thus can be calculated by the triangulardistance measuring method.

However, since the height of the portion of the measuring object Scorresponding to the position on the image where the marker M isdisplayed cannot be known before the irradiation of the measurementlight, the measurement light cannot be accurately applied only to such aportion. Therefore, when the light receiving unit 120 is focused on theportion, the measuring object S is irradiated with the measurement lighthaving a spread corresponding to a predetermined range (e.g., range ofdepth of field of light receiving unit 120) including the relevantportion as the center. The portion of the measuring object Scorresponding to the position where the marker M is displayed is therebyirradiated with the measurement light, so that the height of the portioncan be calculated.

If the portion of the measuring object SA corresponding to the positionwhere the marker M is displayed is not within the measurable range inthe Z direction of the light receiving unit 120, an error messageindicating that the height cannot be calculated is displayed on thedisplay section 400. The user thus can easily recognize that thespecified position is not within the measurable range in the Z directionof the light receiving unit 120.

In executing the shape measurement processing, the Z stage 142 of thestage 140 of FIG. 2 is moved so that the light receiving unit 120 isfocused on the portion of the measuring object S corresponding to theposition where the marker M is displayed based on the calculated height.The movement of the Z stage 142 may be automatically performed(auto-focus function) by having the CPU 210 of FIG. 1 drive the stagedrive unit 146 of FIG. 1. Alternatively, the movement of the Z stage 142may be manually performed by the user operating the stage operation unit145 of FIG. 1. In this case, the CPU 210 may numerically or visuallydisplay the direction of moving and the amount of moving the Z stage 142on the display section 400. The user thus can focus the light receivingunit 120 on the specified portion of the measuring object SA.

(2) Second Example of Second Auxiliary Function of Focus Adjustment

FIGS. 50A and 50B, and FIG. 51 are views describing a second example ofthe second auxiliary function of the focus adjustment. In the example ofFIGS. 50A and 50B and FIG. 51, one measuring object S is mounted on thestage 140 of FIG. 1. The measuring object S of FIGS. 50A and 50B, andFIG. 51 has a plurality of upper surfaces, where the height of eachupper surface differs from each other. On the display section 400 isdisplayed the still image or the live image of the measuring object Sbased on the light receiving signal output by the light receiving unit120 of FIG. 1.

In the second example of the second auxiliary function of the focusadjustment, the user can place the cursor C at an arbitrary position onthe image of the display section 400 by operating the operation unit 250of the PC 200 of FIG. 1, similarly to the first example of the secondauxiliary function of the focus adjustment. The user can display themarker M at the position specified with the cursor C by selecting therelevant position in this state.

The user sequentially repeats placing the cursor C to each of aplurality of arbitrary positions and then displaying the marker M todisplay the marker M at each of the plurality of positions specifiedwith the cursor C on the display section 400. Each time the marker M isdisplayed at the specified position, the height of the portion of themeasuring object S corresponding to such a portion is calculated.

In this example, as shown in FIG. 50A, the user places the cursor C atthe position of the measuring object S displayed on the display section400. The relevant position is selected in this state, so that the usercan display a first marker M1 at the position of the measuring object Sspecified with the cursor C on the display section 400, as shown in FIG.50B.

After the marker M1 is displayed, at least the portion of the measuringobject S corresponding to the position where the marker M1 is displayedand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110. The height of theportion of the measuring object S corresponding to the position wherethe marker M1 is displayed thus can be calculated by the triangulardistance measuring method. If the portion of the measuring object Scorresponding to the position where the marker M1 is displayed is notwithin the measurable range in the Z direction, an error messageindicating that the height cannot be calculated is displayed on thedisplay section 400.

Next, as shown in FIG. 50A, the user places the cursor C at anotherposition of the measuring object S displayed on the display section 400.The relevant position is selected in this state, so that the user candisplay a second marker M2 at the position of the measuring object Sspecified with the cursor C on the display section 400, as shown in FIG.50B.

After the marker M2 is displayed, at least the portion of the measuringobject S corresponding to the position where the marker M2 is displayedand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110. The height of theportion of the measuring object S corresponding to the position wherethe marker M2 is displayed thus can be calculated by the triangulardistance measuring method. If the portion of the measuring object Scorresponding to the position where the marker M2 is displayed is notwithin the measurable range in the Z direction, an error messageindicating that the height cannot be calculated is displayed on thedisplay section 400.

Next, as shown in FIG. 50A, the user places the cursor C at anotherfurther position of the measuring object S displayed on the displaysection 400. The relevant position is selected in this state, so thatthe user can display a third marker M3 at the position of the measuringobject S specified with the cursor C on the display section 400, asshown in FIG. 50B.

After the marker M3 is displayed, at least the portion of the measuringobject S corresponding to the position where the marker M3 is displayedand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110. The height of theportion of the measuring object S corresponding to the position wherethe marker M3 is displayed thus can be calculated by the triangulardistance measuring method. If the portion of the measuring object Scorresponding to the position where the marker M3 is displayed is notwithin the measurable range in the Z direction, an error messageindicating that the height cannot be calculated is displayed on thedisplay section 400.

The user preferably places the cursor C so as to include the portion atthe highest position and the portion at the lowest position among theplurality of portions of the measuring object S when placing the cursorC at a plurality of positions of the measuring object S displayed on thedisplay section 400. The distance in the Z direction among the pluralityof portions of the measuring object S corresponding to the plurality ofmarkers M1 to M3 may be measured.

In executing the shape measurement processing, the Z stage 142 of thestage 140 of FIG. 2 is moved such that the plurality of portions of themeasuring object S corresponding to the markers M1 to M3 are distributednear the focus of the light receiving unit 120 based on the plurality ofcalculated heights, as shown in FIG. 51. In this example, the pluralityof portions of the measuring object S corresponding to the markers M1 toM3 displayed on the image of the display section 400 are indicated withdotted circles.

Therefore, according to the second example of the second auxiliaryfunction of the focus adjustment, the plurality of portions of themeasuring object S corresponding to the plurality of specified positionscan be positioned within the range of the depth of field of the lightreceiving unit 120 by the user specifying the plurality of arbitrarypositions on the image of the measuring object S displayed on thedisplay section 400. In the shape measurement processing of themeasuring object S, the plurality of arbitrary portions of the measuringobject S thus can be accurately and easily positioned within the rangeof the depth of field of the light receiving unit 120.

Similarly to the first example of the second auxiliary function of thefocus adjustment, the Z stage 142 may be moved automatically or manuallyby the user. The user thus can focus the light receiving unit 120 on aplurality of desired portions of the measuring object S. When the Zstage 142 is manually moved by the user, the height of the portion tomeasure may be again calculated and whether or not the measuring objectS is mounted at a position suited for the shape measurement processingmay be checked before executing the shape measurement processing of themeasuring object S.

(3) Third Example of Second Auxiliary Function of Focus Adjustment

FIGS. 52A and 52B, and FIGS. 53A to 53D are views describing a thirdexample of the second auxiliary function of the focus adjustment. In theexamples of FIGS. 52A and 52B, and FIGS. 53A to 53D, a plurality ofmeasuring objects SA, SB, SC, SD having different heights from eachother are mounted on the stage 140 of FIG. 1. The still images or thelive images of the measuring objects SA to SD are displayed on thedisplay section 400 based on the light receiving signal output by thelight receiving unit 120 of FIG. 1.

In the third example of the second auxiliary function of the focusadjustment, the user can operate the operation unit 250 of the PC 200 ofFIG. 1 to display the marker M at each of a plurality of specifiedpositions on the image of the display section 400, similarly to thesecond example of the second auxiliary function of the focus adjustment.Each time the marker M is displayed at the specified position, theheight of the portion of the measuring object S corresponding to such aposition is calculated.

In this example, the user places the cursor C at the position on themeasuring object SA displayed on the display section 400, as shown inFIG. 52A. When the relevant position is selected in this state, the usercan display a marker MA at the position on the measuring object SAspecified with the cursor C on the display section 400, as shown in FIG.52B.

After the marker MA is displayed, at least the portion of the measuringobject SA corresponding to the position where the marker MA is displayedand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110. The height of theportion of the measuring object SA corresponding to the position wherethe marker MA is displayed thus can be calculated by the triangulardistance measuring method. If the portion of the measuring object SAcorresponding to the position where the marker MA is displayed is notwithin the measurable range in the Z direction, an error messageindicating that the height cannot be calculated is displayed on thedisplay section 400.

Then, as shown in FIG. 52A, the user places the cursor C at the positionon the measuring object SB displayed on the display section 400. Whenthe relevant position is selected in this state, the user can display amarker MB at the position on the measuring object SB specified with thecursor C on the display section 400, as shown in FIG. 52B.

After the marker MB is displayed, at least the portion of the measuringobject SB corresponding to the position where the marker MB is displayedand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110. The height of theportion of the measuring object SB corresponding to the position wherethe marker MB is displayed thus can be calculated by the triangulardistance measuring method. If the portion of the measuring object SBcorresponding to the position where the marker MB is displayed is notwithin the measurable range in the Z direction, an error messageindicating that the height cannot be calculated is displayed on thedisplay section 400.

Then, as shown in FIG. 52A, the user places the cursor C at the positionon the measuring object SC displayed on the display section 400. Whenthe relevant position is selected in this state, the user can display amarker MC at the position on the measuring object SC specified with thecursor C on the display section 400, as shown in FIG. 52B.

After the marker MC is displayed, at least the portion of the measuringobject SC corresponding to the position where the marker MC is displayedand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110. The height of theportion of the measuring object SC corresponding to the position wherethe marker MC is displayed thus can be calculated by the triangulardistance measuring method. If the portion of the measuring object SCcorresponding to the position where the marker MC is displayed is notwithin the measurable range in the Z direction, an error messageindicating that the height cannot be calculated is displayed on thedisplay section 400.

Then, as shown in FIG. 52A, the user places the cursor C at the positionon the measuring object SD displayed on the display section 400. Whenthe relevant position is selected in this state, the user can display amarker MD at the position on the measuring object SD specified with thecursor C on the display section 400, as shown in FIG. 52B.

After the marker MD is displayed, at least the portion of the measuringobject SD corresponding to the position where the marker MD is displayedand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110. The height of theportion of the measuring object SD corresponding to the position wherethe marker MD is displayed thus can be calculated by the triangulardistance measuring method. If the portion of the measuring object SDcorresponding to the position where the marker MD is displayed is notwithin the measurable range in the Z direction, an error messageindicating that the height cannot be calculated is displayed on thedisplay section 400.

When the user places the cursor C at the respective positions on theplurality of measuring objects SA to SD displayed on the display section400, the user preferably places the cursor C so that the plurality ofportions from the portion at the highest position to the portion at thelowest position among the plurality of portions of the plurality ofmeasuring objects SA to SD are at substantially equal interval. Thedistance in the Z direction among the portions of the measuring objectsSA to SD corresponding to the plurality of markers MA to MD may bemeasured.

In executing the shape measurement processing, the Z stage 142 of thestage 140 is moved so that the portion of the measuring object SA at thehighest position among the plurality of calculated portions is at thefocus of the light receiving unit 120, as shown in FIG. 53A. In thisexample, the portions of the measuring objects SA to SD corresponding tothe markers MA to MD displayed on the image of the display section 400are shown with dotted circles. The shape measurement of the measuringobject SA is carried out in this state. After the shape measurement ofthe measuring object SA is carried out, the Z stage 142 of the stage 140is moved so that the portion of the measuring object SD at the secondhighest position among the plurality of calculated portions is at thefocus of the light receiving unit 120, as shown in FIG. 53B. The shapemeasurement of the measuring object SD is carried out in this state.

After the shape measurement of the measuring object SD is carried out,the Z stage 142 of the stage 140 is moved so that the portion of themeasuring object SB at the third highest position among the plurality ofcalculated portions is at the focus of the light receiving unit 120, asshown in FIG. 53C. The shape measurement of the measuring object SB iscarried out in this state. After the shape measurement of the measuringobject SB is carried out, the Z stage 142 of the stage 140 is moved sothat the portion of the measuring object SC at the lowest highestposition among the plurality of calculated portions is at the focus ofthe light receiving unit 120, as shown in FIG. 53D. The shapemeasurement of the measuring object SC is carried out in this state.

After the shape measurement of the measuring objects SA to SD isfinished, the shape data indicating the shapes of the measuring objectsSA to SD are synthesized. Similarly to the first example of the secondauxiliary function of the focus adjustment, the Z stage 142 may be movedautomatically or manually by the user. Thus, even if the distance fromthe portion at the specified highest position to the portion at thespecified lowest position exceeds the measurable range in the Zdirection, the user can focus the light receiving unit 120 to each ofthe specified portions of the plurality of measuring objects SA to SD.

According to the third example of the second auxiliary function of thefocus adjustment, the user can specify a plurality of arbitrarypositions on the image of the measuring object S displayed on thedisplay section 400, so that the measuring object S is irradiated withlight with each of the plurality of portions of the measuring object Scorresponding to each of the plurality of specified positions positionedat the focus of the light receiving unit 120. Thus, in the shapemeasurement processing of the measuring object S, each of the pluralityof arbitrary portions of the measuring object S can be accurately andeasily positioned at the focus of the light receiving unit 120.

In the first to third examples of the second auxiliary function of thefocus adjustment, when the portion of the measuring object Scorresponding to the position where the marker M is displayed is not inthe measurable range in the Z direction, the CPU 210 of FIG. 1 maychange the position where the marker M is displayed to position theportion of the measuring object S corresponding to the position aftersuch change within the measurable range in the Z direction. Thus, thelight receiving unit 120 can accurately and easily focus on the portionof the measuring object S corresponding to the position of the marker Mafter the change or the position at the periphery thereof. In the shapemeasurement processing, the shape of the measuring object S can bemeasured based on the position of the marker M after the change.

In the second and third examples of the second auxiliary function of thefocus adjustment, the user specifies the position desired to be focusedon the display section 400, and the Z stage 142 is controlled such thatthe light receiving unit 120 focuses on the portion of the measuringobject S corresponding to the specified position. In order to focus thelight receiving unit 120 on the portion of the measuring object Scorresponding to the specified position, the height of the relevantportion needs to be known, and thus, such a portion to calculate theheight is irradiated with the measurement light.

However, it is difficult to accurately irradiate the portion of themeasuring object S corresponding to the specified position with themeasurement light. This is because the measurement light shifts in the Xdirection according to the height of the measuring object S. Therefore,the height of the relevant portion is necessary to accurately irradiatethe portion of the measuring object S corresponding to the specifiedposition with the measurement light. In this example, the measuringobject S is irradiated with the measurement light having a predeterminedwidth in the X direction so that at least the height of the portion ofthe measuring object S corresponding to the specified position iscalculated. Note that the entire width of the measuring object S in theX direction may be irradiated with the measurement light.

After the height of the portion of the measuring object S correspondingto the specified position is calculated, the Z stage 142 is moved sothat the focus of the light receiving unit 120 is at the calculatedheight. Since the height cannot be calculated for the portion of themeasuring object S outside the current measurable range in the Zdirection of the light receiving unit 120, the Z stage 142 cannot bemoved so that the focus of the light receiving unit 120 is at therelevant portion.

The user thus sequentially specifies the position corresponding to theportion desired to be focused and moves the Z stage 142 while specifyingthe position corresponding to the portion of the measuring object Sassumed to be relatively close to the focus of the light receiving unit120 from the current position of the Z stage 142. The overall height ofthe measuring object S thus can be calculated even for the measuringobject S having a large dimension in the Z direction.

(4) Increase in Speed of Calculation of Height

The height of the portion of the measuring object S corresponding to theposition where the marker M is displayed is preferably calculated athigh speed. The methods of increasing the speed of calculation of heightwill be described below.

FIG. 54 is a view describing a first method of increasing the speed ofcalculation of height. The portion of the measuring object Scorresponding to the position where the marker M is displayed isreferred to as a measuring portion Ms. As shown in FIG. 54, the lightprojecting unit 110 can irradiate the measuring object S with themeasurement light obliquely from above in a range from point A to pointA′. In the example of FIG. 54, the height of the measuring portion Ms ofthe measuring object S is calculated. The measurable range in the Zdirection of the measuring portion Ms of the measuring object S is arange from point P to point P′. The points P, P′ are defined by theposition in the X direction of the measuring portion Ms.

The point P, which is the upper limit of the measurable range in the Zdirection is irradiated with the measurement light emitted from point Bof the light projecting unit 110. On the other hand, the point P′, whichis the lower limit of the measurable range in the Z direction isirradiated with the measurement light emitted from point B′ of the lightprojecting unit 110. That is, it is sufficient for the light projectingunit 110 to irradiate the measurement light in the range from point B topoint B′ in the range from point A to point A′ to calculate the heightof the measuring portion Ms of the measuring object S.

Thus, the light projecting unit 110 irradiates the measuring object Swith the measurement light in the range from point B to point B′, anddoes not irradiate the measuring object S with the measurement light inthe range from point A to point B and in the range from point B′ topoint A′. In this case, the range to acquire the pattern image isreduced in the calculation of height. The speed of the calculation ofheight of the measuring portion Ms of the measuring object S thusincreases.

FIG. 55 is a view describing a second method of increasing the speed ofcalculation of height. The portion of the measuring object Scorresponding to the position where the marker M is displayed isreferred to as the measuring portion Ms. In the example of FIG. 55, theheight of the measuring portion Ms of the measuring object S iscalculated. The light receiving unit 120 of FIG. 1 can selectivelyoutput only a specific range of the light receiving signal correspondingto the pixels arrayed two-dimensionally to the control board 150 of FIG.2.

In this example, when calculating the height, the light receiving unit120 outputs only the light receiving signal corresponding to the line Lof a certain width that includes the measuring portion Ms and extends inthe X direction of the light receiving signal of the visual field rangeto the control board 150 of FIG. 1, as shown in FIG. 55. On the otherhand, the light receiving unit 120 does not output the light receivingsignal corresponding to other portions of the light receiving signal ofthe visual field range. In other words, in the examples of FIGS. 2 and55, the irradiation position of the measurement light changes in the Xdirection depending on the height of the measuring object S but does notchange in the Y direction. Using such properties, the range in the Ydirection of the light receiving signal output by the light receivingunit 120 is limited in a state where the height of the portion of themeasuring object S corresponding to at least the specified position canbe calculated.

In this case, the transfer speed of the light receiving signal from thelight receiving unit 120 to the control board 150 enhances. Therefore,the frame rate of the light receiving unit 120 can be increased. The CPU210 of FIG. 1 thus can acquire the pattern image at high speed. As aresult, the speed of the calculation of height of the measuring portionMs of the measuring object S can be increased.

FIG. 56 is a view describing a third method of increasing the speed ofcalculation of height. The portions of the measuring object Scorresponding to the positions where a plurality of markers M aredisplayed are referred to as measuring portions Ms1, Ms2, Ms3. In theexample of FIG. 56, the heights of the plurality of measuring portionsMs1 to Ms3 of the measuring object S are calculated.

In this example, when calculating the height, the vicinity of theplurality of measuring portions Ms1 to Ms3 is irradiated with themeasurement light to acquire the pattern images of the plurality ofmeasuring portions Ms1 to Ms3 of the measuring object S. In this case,the pattern of the measurement light is preferably set to include thepositions in the Y direction of the measuring portions Ms1 to Ms3. Onthe other hand, the other portions of the portions of the measuringobject S are not irradiated with measurement light. The range to acquirethe pattern image is thereby reduced. As a result, the speed of thecalculation of heights of the plurality of measuring portions Ms1 to Ms3of the measuring object S increases.

Accordingly, in the first to third methods of increasing the speed ofcalculation of height, the processing time of the CPU 210 is reducedwhen calculating the height. The position of the portion of themeasuring object S corresponding to the position specified through theoperation unit 250 thus can be calculated at high speed. The first tothird methods of increasing the speed of the calculation of height canbe executed in combination. The height of the measuring portion Ms ofthe measuring object S thus can be calculated at 220 ms, for example.

(5) Height Display Function

The user can display information (e.g., height) related to the positionof the specified portion in the measuring object S on the displaysection 400. FIGS. 57A to 57C are views showing an example of the heightdisplay function. As shown in FIG. 57A, the user can operate theoperation unit 250 of the PC 200 of FIG. 1 to place the cursor C at anarbitrary position of the measuring object S displayed on the displaysection 400.

When the relevant position is selected in this state, at least theportion of the measuring object S corresponding to the selected positionand the portion at the periphery thereof are irradiated with themeasurement light from the light projecting unit 110 of FIG. 1. Theheight of the portion of the measuring object S corresponding to theselected position is thereby calculated with the triangular distancemeasuring method. The calculated height is displayed on the displaysection 400, as shown in FIG. 57B. The user thus can easily recognizethe calculated height.

The user can operate the operation unit 250 of the PC 200 to place thecursor C at another position in the measuring object S displayed on thedisplay section 400. When the relevant position is selected in thisstate, the height of the portion of the measuring object S correspondingto the selected position is calculated. As shown in FIG. 57C, thecalculated height is displayed on the display section 400. A differencein heights of a plurality of portions of the measuring object S selectedthrough the operation unit 250 of the PC 200 may be displayed on thedisplay section 400. In this case, the user can recognize the differencein the calculated heights of the plurality of portions.

(6) Profile Display Function

The user can display a profile of the specified portion in the measuringobject S on the display section 400. FIGS. 58A and 58B, and FIGS. 59Aand 59B are views describing the measurement of the profile of themeasuring object S. The measuring object S of FIGS. 58A and 58B, andFIGS. 59A and 59B has a plurality of upper surfaces, where the height ofeach upper surface differs from each other. FIGS. 58A and 59A showperspective views of the measuring object S in a state irradiated withthe measurement light from the light projecting unit 110. FIGS. 58B and59B show plan views of the measuring object S irradiated with themeasurement light.

In the example of FIG. 58A, the linear measurement light parallel to theY direction is emitted from the light projecting unit 110. In this case,as shown in FIG. 58B, a plurality of portions of the linear measurementlight parallel to the Y direction are shifted with respect to each otherin the X direction by a distance corresponding to the heights of theplurality of upper surfaces of the measuring object S and applied on theplurality of upper surfaces of the measuring object S.

In the example of FIG. 59A, a plurality of pieces of linear measurementlight parallel to the Y direction and shifted in the X direction by adistance corresponding to the height of each upper surface of themeasuring object S are emitted from the light projecting unit 110. Inthis case, as shown in FIG. 59B, the plurality of upper surfaces of themeasuring object S are irradiated with the plurality of pieces of linearmeasurement light parallel to the Y direction so as to be lined on thesame line. The profile of the measuring object S can be measured basedon the distance in the X direction among the plurality of pieces oflinear measurement light emitted from the light projecting unit 110 andthe position in the Y direction of each linear measurement light.

FIGS. 60A to 60C and FIGS. 61A to 61C are views showing a measurementprocedure of the profile of the measuring object S. First, as shown inFIG. 60A, the user operates the operation unit 250 of the PC 200 of FIG.1 to specify the position in the X direction of the measuring portion ofthe measuring object S on the display section 400. A reference line RLparallel to the Y direction indicated with a dotted line in FIG. 60A maybe displayed on the specified position in the X direction. Note that theprocedure of FIG. 60A may be omitted when not displaying the referenceline RL.

As shown in FIG. 60B, the user operates the operation unit 250 to movethe linear measurement light displayed at a part of the upper surface ofthe measuring object S on the display section 400 in the X direction soas to overlap the reference line RL. The portion of the linearmeasurement light to be moved is determined by the user operating theoperation unit 250 and specify a plurality of locations of the positionin the Y direction of the linear measurement light, for example. The CPU210 of FIG. 1 deforms the linear measurement light emitted from thelight projecting unit 110 by controlling the pattern generating portion112 of FIG. 2 so that the measuring object S is irradiated with thelinear measurement light displayed on the display section 400.

As shown in FIGS. 60C and 61A, the user then repeats the operation ofoperating the operation unit 250 and moving the linear measurement lightdisplayed at another part of the upper surface of the measuring object Son the display section 400 in the X direction so as to overlap thereference line RL. The CPU 210 thereby further deforms the linearmeasurement light emitted from the light projecting unit 110 bycontrolling the pattern generating portion 112 so that the measuringobject S is irradiated with the linear measurement light displayed onthe display section 400.

The CPU 210 calculates the profile (cross-sectional shape) of themeasuring object S based on the movement distance of each portion of thelinear measurement light moved on the display section 400 before thelinear measurement light displayed on the display section 400 becomeslinear. As shown in FIG. 61B, the calculated profile PR of the measuringobject S is displayed on the display section 400 so as to be side byside with the image of the measuring object S. In this case, the usercan easily recognize the cross-sectional shape of the measuring object Sby operating the pattern of the light displayed on the display section400. The profile PR may be displayed on the display section 400 so as tooverlap the image of the measuring object S, or may be displayed in awindow different from the window in which the measuring object S isdisplayed.

The user can specify a plurality of portions of the profile PR byoperating the operation unit 250. As shown in FIG. 61C, the dimensionbetween the plurality of portions of the measuring object Scorresponding to the plurality of portions specified by the user isdisplayed on the display section 400. The dimension such as the width,the height, or the like of the arbitrary portions of the measuringobject S thus can be easily recognized.

(7) Effects

In the shape measuring device 500 according to the present embodiment,when the user specifies an arbitrary position on the image of themeasuring object S displayed on the display section 400, the position ofthe portion of the measuring object S corresponding to the specifiedposition is calculated by the triangular distance measuring method. Thecalculated position is positioned at the focus of the light receivingunit 120. The arbitrary portion of the measuring object S thus can beaccurately and easily positioned at the focus of the light receivingunit 120 in the shape measurement processing of the measuring object S.

[8] First Auxiliary Function of Posture Adjustment

(1) First Example of First Auxiliary Function of Posture Adjustment

In the second adjustment in the preparation of the shape measurement,the posture of the measuring object S is adjusted. FIGS. 62A to 62D areviews describing the adjustment of the posture of the measuring objectS. FIGS. 62A and 62C show states in which the measuring object S on thestage 140 is irradiated with the measurement light from the lightprojecting unit 110. FIGS. 62B and 62D show images displayed on thedisplay section 400 when the measuring object S is imaged by the lightreceiving unit 120 of FIGS. 62A and 62C, respectively.

In the examples of FIGS. 62A to 62D, the measuring object S is a blockhaving an L-shaped cross section with an upper surface of two levelshaving different heights. In the example of FIG. 62A, the measurementlight from the light projecting unit 110 is shielded by the uppersurface on the upper level of the measuring object S. In this case,shade Ss is formed at the measurement position in the upper surface ofthe lower level of the measuring object S, as shown in FIG. 62B.Therefore, the shape of the measurement position of the measuring objectS cannot be measured.

In the example of FIG. 62C, the posture of the measuring object S isadjusted by changing the direction of the measuring object S. In thiscase, the shade Ss is not formed at the measurement position in theupper surface of the lower level of the measuring object S, as shown inFIG. 62D. Therefore, the shape of the measurement position of themeasuring object S can be measured.

However, even if the shade is not formed at the measurement position,the measurement light that is reflected a plurality of times(multiply-reflected) by the plurality of portions of the measuringobject S is sometimes received by the light receiving unit 120 ofFIG. 1. In this case, a pseudo-image by the multiply-reflectedmeasurement light is displayed in a superimposing manner on the image ofthe measuring object S on the display section 400 of FIG. 1. The shapeof the measurement position of the measuring object S thus cannot beaccurately measured.

The formation of shade Ss or occurrence of multiple reflection at a partof the measuring object S is a natural phenomenon, and the user may notnotice even if the shade Ss is formed or the multiple reflection occursat the measurement position. The shape measuring device 500 according tothe present embodiment is thus provided with a function (hereinafterreferred to as first auxiliary function of posture adjustment) ofassisting the mounting of the measuring object S at the posture in whichthe shade Ss is not formed and the multiple reflection does not occur atthe measurement position.

In the first example of the first auxiliary function of the postureadjustment, the measuring object S is irradiated with the measurementlight for the posture adjustment having a predetermined pattern from thelight projecting unit 110 of FIG. 2. Hereinafter, the measurement lightwith which the measuring object S is irradiated from the lightprojecting unit 110 for posture adjustment is referred to as adjustmentlight. The pattern of the adjustment light may be different from thepattern of the measurement light with which the measuring object S isirradiated in the shape measurement processing.

As an example of the pattern of the adjustment light different from thepattern of the measurement light with which the measuring object S isirradiated in the shape measurement processing, the measuring object Smay be irradiated with the adjustment light having the pattern of onemeasurement light among the plurality of pieces of measurement lightwith which the measuring object S is sequentially irradiated in theshape measurement processing. Alternatively, the measuring object S maybe irradiated with the adjustment light having the pattern differentfrom the pattern of any measurement light among the plurality of piecesof measurement light with which the measuring object S is sequentiallyirradiated in the shape measurement processing.

The adjustment light preferably has a pattern in which the formation ofshade or occurrence of multiple reflection can be easily determined bythe user. When the measuring object S is irradiated with the adjustmentlight having such a pattern, the user can easily determine that theshade formed or the multiple reflection occurred at the measurementposition. A striped pattern parallel to the Y direction of FIG. 2 isreferred to as a vertical pattern, and a striped pattern parallel to theX direction of FIG. 2 is referred to as a horizontal pattern.

FIGS. 63A and 63B, and FIGS. 64A and 64B are views describing the firstexample of the first auxiliary function of the posture adjustment. FIG.63A shows an image of the measuring object S irradiated with theadjustment light having the vertical pattern from the one lightprojecting unit 110A. As shown in FIG. 63A, shades are formed in regionsR1, R2, R3, R4, which are indicated with dotted circles. The lowering incontrast of the vertical pattern occurred due to multiple reflection ina region R5 indicated with a dotted rectangle.

FIG. 63B shows an image of the measuring object S irradiated with theadjustment light having the vertical pattern from the other lightprojecting unit 110B. As shown in FIG. 63B, shades are formed in regionsR6, R7, R8, R9, which are indicated with dotted circles. In a region R10indicated with a dotted rectangle, the interval of the vertical patternis close since the portion of the measuring object S is inclined.

FIG. 64A shows an image of the measuring object S irradiated with theadjustment light having the horizontal pattern from the one lightprojecting unit 110A. As shown in FIG. 64A, shades are formed in theregions R1, R2, R3, R4, which are indicated with dotted circles. Thelowering in contrast of the horizontal pattern occurred due to multiplereflection in the region R5 indicated with a dotted rectangle.

FIG. 64B shows an image of the measuring object S irradiated with theadjustment light having the horizontal pattern from the other lightprojecting unit 110B. As shown in FIG. 64B, shades are formed in theregions R6, R7, R8, R9, which are indicated with dotted circles.

As shown in FIGS. 63A and 63B, and FIGS. 64A and 64B, the shape cannotbe accurately measured in the region where the shade is formed, in theregion where the lowering of the contrast of the pattern occurs due tomultiple reflection, and in the region where the interval of the patternis close in the measuring object S. The region where the shade isformed, the region where the lowering of the contrast of the patternoccurs due to multiple reflection, and the region where the interval ofthe pattern is close in the measuring object S are hereinafter referredto as measurement difficulty regions.

In the first auxiliary function of the posture adjustment, the user caneasily recognize the measurement difficulty region since the measuringobject S is irradiated with the adjustment light having the patterndifferent from the pattern of the measurement light in the shapemeasurement processing. The use of the pattern of the adjustment lighthaving the same pattern as the pattern of the sinusoidal measurementlight, the striped measurement light, or the coded measurement light maynot be appropriate in the recognition of the measurement difficultyregion.

The reason is that the unit of interval and movement of a plurality oflines (stripes) parallel to the Y direction that forms the pattern isset to appropriately carry out the shape measurement processing.Therefore, it is preferable to irradiate the measuring object S with theadjustment light having a pattern in which the user can easily recognizethe portion where the shade and the like are formed, which becomes themeasurement difficulty region. The user thus can easily recognize themeasurement difficulty region.

The user can adjust the posture of the measuring object S with themeasuring object S irradiated with the adjustment light. The posture ofthe measuring object S may be adjusted by rotating the measuring objectS on the stage 140, for example, or by moving the θ stage 143 of thestage 140, for example. In this case, the posture of the measuringobject S can be easily adjusted to a state appropriate for the shapemeasurement before the shape measurement of the measuring object S sincethe posture of the measuring object S can be adjusted while checking themeasurement difficulty region.

(2) Second Example of First Auxiliary Function of Posture Adjustment

In a second example of the first auxiliary function of the postureadjustment, the measuring object S is irradiated with the adjustmentlight from both light projecting units 110A, 110B. The region where theshade is formed, the region where the lowering of the contrast of thepattern occurs due to multiple reflection, and the region where theinterval of the pattern is close become the measurement difficultyregion regardless of with which adjustment light, the adjustment lightfrom the light projecting unit 110A or the adjustment light from thelight projecting unit 110B, the measuring object S is irradiated.

FIG. 65 is a view describing a second example of the first auxiliaryfunction of the posture adjustment. FIG. 65 shows an image of themeasuring object S irradiated with the adjustment light having ahorizontal pattern from the one light projecting unit 110A andirradiated with the adjustment light having a vertical pattern from theother light projecting unit 110B.

As shown in FIG. 65, the lowering in the contrast of the horizontalpattern occurred due to multiple reflection in the region R5 indicatedwith the dotted rectangle. In the region R10 indicated with the dottedrectangle, the interval of the vertical pattern is close since theportion of the measuring object S is inclined.

Therefore, in this example, the regions R5, R10 are the measurementdifficulty regions. Thus, the measurement difficulty region can bereduced by irradiating the measuring object S with the adjustment lightfrom both light projecting units 110A, 110B as compared to the casewhere the measuring object S is irradiated with the adjustment lightfrom any one of the light projecting units 110A, 110B.

In the example described above, the adjustment light having thehorizontal pattern is emitted from the one light projecting unit 110Aand the adjustment light having the vertical pattern is emitted from theother light projecting unit 110B, but the present invention is notlimited thereto. The adjustment light having the vertical pattern may beemitted from the one light projecting unit 110A, and the adjustmentlight having the horizontal pattern may be emitted from the other lightprojecting unit 110B. If there is no need to distinguish the adjustmentlight from the light projecting unit 110A and the adjustment light fromthe light projecting unit 110B, both light projecting units 110A, 110 bmay emit the adjustment light having the vertical pattern or both lightprojecting units 110A, 110B may emit the adjustment light having thehorizontal pattern.

In the example described above, the image of the measuring object Ssimultaneously irradiated with the adjustment light from the lightprojecting units 110A, 110B is displayed, but the present invention isnot limited thereto. The image (e.g., image of FIG. 64A) of themeasuring object S irradiated with the adjustment light from the onelight projecting unit 110A and the image (e.g., image of FIG. 63B) ofthe measuring object S irradiated with the adjustment light from theother light projecting unit 110B may be separately displayed. In thiscase, an image substantially equivalent to the image of FIG. 65 can bedisplayed by synthesizing the image of FIG. 63B and the image of FIG.64A.

Alternatively, similarly to the example of FIG. 5, the image of themeasuring object S irradiated with the adjustment light from the onelight projecting unit 110A and the image of the measuring object Sirradiated with the adjustment light from the other light projectingunit 110B may be displayed on the display section 400 in dual screen soas to be displayed side by side. FIG. 66 is a view showing an example ofthe GUI for displaying the images in dual screen.

As shown in FIG. 66, the image of the measuring object S irradiated withthe adjustment light from the one light projecting unit 110A isdisplayed in the image display region 410 of the display section 400.The image of the measuring object S irradiated with the adjustment lightfrom the other light projecting unit 110B is displayed in the imagedisplay region 420 of the display section 400. If two images of themeasuring object S are displayed side by side, the user can easilydistinguish and recognize the measurement difficult region when themeasuring object S is irradiated with the adjustment light from the onelight projecting unit 110A and the measurement difficulty region whenthe measuring object S is irradiated with the adjustment light from theother light projecting unit 110B.

Thus, the user can easily distinguish and recognize the measurementdifficult region corresponding to the light projecting unit 110A and themeasurement difficulty region corresponding to the light projecting unit110B by separately displaying the images of the measuring object Sirradiated with the adjustment light from the respective lightprojecting units 110A, 110B on the display section 400. The user thuscan select the light projecting unit 110 in which the measurementposition is not included in the measurement difficulty region from thelight projecting units 110A, 110B, and carry out the shape measurementprocessing.

If the measuring object is irradiated with the measurement light fromboth light projecting units 110A, 110B, the measurement difficultyregion is reduced as compared to the case where the measuring object isirradiated with the measurement light from one of the light projectingunits 110A, 110B. The user can recognize the measurement difficultyregion when the measuring object S is irradiated with the measurementlight from both light projecting units 110A, 110B by synthesizing theimages of the measuring object S irradiated with the adjustment lightfrom the respective light projecting units 110A, 110B and displaying thesame on the display section 400.

The shape measurement can be carried out for the portion of themeasuring object S irradiated with at least one measurement light fromthe light projecting units 110A, 110B. In other words, the shapemeasurement cannot be carried out for the portion of the measuringobject S that is not irradiated with the measurement light from eitherof the light projecting units 110A, 110B. Therefore, the user merelyneeds to recognize the portion of the measuring object S that is notirradiated with the measurement light from either of the lightprojecting units 110A, 110B.

In the example of FIG. 65, the image of the measuring object S in astate irradiated with the adjustment light from both light projectingunits 110A, 110B is displayed on the display section 400. In the exampleof FIG. 66, the image of the measuring object S in a state irradiatedwith the adjustment light from the one light projecting unit 110A andthe image of the measuring object S in a state irradiated with theadjustment light from the other light projecting unit 110B are displayedside by side on the display section 400. The user thus can easilyrecognize the portion of the measuring object S that becomes themeasurement difficulty region by not being irradiated with themeasurement light from either of the light projecting units 110A, 110B.

In the first and second examples of the first auxiliary function of theposture adjustment, the adjustment light has the vertical pattern or thehorizontal pattern, but the present invention is not limited thereto.The adjustment light may, for example, have a dot pattern or a checkeredpattern (checkerboard design). Alternatively, the adjustment light mayhave a uniform light amount distribution (uniform pattern). The userthen can more easily recognize the measurement difficulty region. FIG.67 is a view showing the measuring object S irradiated with light havingthe uniform pattern for the adjustment light. As shown in FIG. 67, theshade Ss is formed at a part of the measuring object S. The user canrecognize the measurement difficulty region based on the shade Ss formedon the measuring object S.

When using the light having the uniform pattern for the adjustmentlight, the measuring object S is preferably irradiated with theadjustment light in which the intensity, the frequency, or the like isappropriately set so that the user can easily recognize the portionwhere the shade and the like are formed, which becomes the measurementdifficulty region. According to such a configuration, the user caneasily recognize the measurement difficulty region as compared to thecase where the measuring object S is irradiated with a natural light asa natural phenomenon.

(3) Estimation of Measurement Difficulty Region

In the first and second examples of the first auxiliary function of theposture adjustment, the user recognizes the measurement difficultyregion by viewing the image of the adjustment light applied on themeasuring object S, but the present invention is not limited thereto. Ifit is difficult for the user to recognize the measurement difficultyregion, the CPU 210 of FIG. 1 may estimate the measurement difficultyregion based on the adjustment light irradiated on the measuring objectS.

The portion of the main stereoscopic shape data corresponding to themeasurement difficulty region is the defective portion such as thedata-missing portion, data inaccurate portion, or the like. Thedefective portion of the main stereoscopic shape data is estimated, andthe image of the measuring object S is displayed such that the estimateddefective portion can be identified, so that the user can accuratelyrecognize the measurement difficulty region. Thus, the posture of themeasuring object S can be easily and accurately adjusted to a stateappropriate for the shape measurement before the shape measurementprocessing of the measuring object S.

FIG. 68 is a view showing an image of the measuring object S includingan estimation result of the measurement difficulty region. In theexample of FIG. 68, the CPU 210 estimates the portion where the shade isformed on the display section 400 as the measurement difficulty regionbased on the portion of the measuring object S that is not irradiatedwith the adjustment light and thus is dark, that is, the shade portion.The CPU 210 can also estimate the portion where the multiple reflectionoccurs on the display section 400 as the measurement difficulty regionbased on the contrast of the pattern of the adjustment light.Furthermore, the CPU 210 can estimate the portion where the pattern ofthe adjustment light is close as the measurement difficulty region.

As shown in FIG. 68, the CPU 210 superimposes and displays the estimatedmeasurement difficulty region on the image of the measuring object S. Inthe example of FIG. 68, the measurement difficulty region is highlightedwith the hatching pattern. The user thus can easily recognize themeasurement difficulty region.

In the estimation of the measurement difficulty region, the measuringobject S may be sequentially irradiated with a plurality of pieces ofadjustment light having different patterns from each other from thelight projecting unit 110. For example, the measuring object S may beirradiated with first adjustment light having the arbitrary pattern fromthe light projecting unit 110, and then the measuring object S may beirradiated with second adjustment light having a pattern in which thebright portion and the dark portion of the first adjustment light areinverted.

In this case, since the shade is formed in the region in which thereflected light is not detected when the measuring object S isirradiated with the first adjustment light or the second adjustmentlight, such a region is estimated as the measurement difficulty region.According to such a procedure, the region in which the reflected lightis not detected due to the correspondence with the dark portion of theadjustment light and the region in which the reflected light is notdetected due to the formation of the shade can be identified.

The image of the measuring object S displayed on the display section 400may be the image of the measuring object S captured using the onemeasurement light, or may be the image of the measuring object Scaptured using the one measurement light and the other measurementlight. Alternatively, the image of the measuring object S displayed onthe display section 400 may be the image of the measuring object Scaptured using the illumination light, or may be the image of thestereoscopic shape of the measuring object S.

The measuring object S may be irradiated with the adjustment light forevery predetermined time. In this case, the CPU 210 sequentiallyestimates the measurement difficulty region for every predetermined timebased on the adjustment light with which the measuring object S isirradiated. According to such a configuration, when the posture of themeasuring object is changed, the measurement difficulty region on theimage of the measuring object S displayed on the display section 400 issequentially updated following the change in the posture of themeasuring object S.

FIGS. 69A and 69B, FIGS. 70A and 70B, and FIGS. 71A and 71B are viewsshowing change in the measurement difficulty region when the measuringobject S is irradiated with the adjustment light from the one lightprojecting unit 110A. FIGS. 69A, 70A, and 71A show states in which themeasuring object S on the stage 140 is irradiated with the adjustmentlight from the one light projecting unit 110A. FIGS. 69B, 70B, and 71Bshow images displayed on the display section 400 when the measuringobject S is imaged by the light receiving unit 120 of FIGS. 69A, 70A,and 71A, respectively.

In the measuring object S of FIGS. 69A and 69B to FIGS. 71A and 71B, tworectangular column-shaped members Sv are formed side by side on aplate-like member Su. In this example, three points P1, P2, P3 at theperiphery of one rectangular column-shaped member Sv are measurementpositions.

In the posture of the measuring object S of FIG. 69A, the measuringobject S is arranged on the stage 140 such that the two rectangularcolumn-shaped members Sv are lined in the X direction. In this case, theportion between the two rectangular column-shaped members Sv and theportion of one side (left side) of the one rectangular column-shapedmember Sv are estimated as the measurement difficulty regions.

As shown in FIG. 69B, the estimated measurement difficulty region issuperimposed and displayed on the image of the measuring object S. Inthe posture of the measuring object S of FIG. 69B, the points P2, P3 arenot included in the measurement difficulty region. However, the point P1is included in the measurement difficulty region.

The user can adjust the posture of the measuring object S by operatingthe stage operation unit 145. FIG. 70A is a view showing a state inwhich the stage 140 of FIG. 69A is rotated 45 degrees in the θdirection. As shown in FIG. 70A, the posture of the measuring object Son the stage 140 changes when the stage 140 is rotated.

As shown in FIG. 70B, the measurement difficulty region on the image ofthe measuring object S displayed on the display section 400 is updatedfollowing the change in the posture of the measuring object S. In theposture of the measuring object S of FIG. 70B, the point P3 is notincluded in the measurement difficulty region. However, the points P1,P2 are included in the measurement difficulty region.

The user can further adjust the posture of the measuring object S byfurther operating the stage operation unit 145. FIG. 71A is a viewshowing a state in which the stage 140 of FIG. 70A is further rotated 45degrees in the θ direction. As shown in FIG. 71A, the posture of themeasuring object S on the stage 140 changes when the stage 140 isrotated.

As shown in FIG. 71B, the measurement difficulty region on the image ofthe measuring object S displayed on the display section 400 is updatedfollowing the change in the posture of the measuring object S. In theposture of the measuring object S of FIG. 71B, the points P1, P3 are notincluded in the measurement difficulty region. However, the point P2 isincluded in the measurement difficulty region.

The user thus can adjust the posture of the measuring object S byoperating the stage operation unit 145 while checking the measurementdifficulty region displayed on the display section 400. On the otherhand, as in the examples of FIGS. 69A and 69B to FIGS. 71A and 71B, itis sometimes difficult to adjust the posture of the measuring object Sso that the points P1 to P3 are not included in the measurementdifficulty region depending on the shape of the measuring object S. Insuch case as well, the measurement difficulty region can be reduced byirradiating the measuring object S with the adjustment light from bothlight projecting units 110A, 110B.

FIGS. 72A and 72B, FIGS. 73A and 73B, and FIGS. 74A and 74B are viewsshowing change in the measurement difficulty region when the measuringobject S of FIGS. 69A and 69B to FIGS. 71A and 71B is irradiated withthe adjustment light from both light projecting units 110A, 110B. FIGS.72A, 73A, and 74A show states in which the measuring object S on thestage 140 is irradiated with the adjustment light from both lightprojecting units 110A, 110B. FIGS. 72B, 73B, and 74B show imagesdisplayed on the display section 400 when the measuring object S isimaged by the light receiving unit 120 of FIGS. 72A, 73A, and 74A,respectively.

In the posture of the measuring object S of FIG. 72A, the measuringobject S is arranged on the stage 140 so that two rectangularcolumn-shaped members Sv are lined in the X direction. In this case, theportion between the two rectangular column-shaped members Sv isestimated as the measurement difficulty region.

As shown in FIG. 72B, the estimated measurement difficulty region issuperimposed and displayed on the image of the measuring object S. Inthe posture of the measuring object S of FIG. 72B, the points P2, P3 arenot included in the measurement difficulty region. However, the point P1is included in the measurement difficulty region.

The user can adjust the posture of the measuring object S by operatingthe stage operation unit 145. FIG. 73A is a view showing a state inwhich the stage 140 of FIG. 72A is rotated 45 degrees in the θdirection. As shown in FIG. 73A, the posture of the measuring object Son the stage 140 changes when the stage 140 is rotated.

As shown in FIG. 73B, the measurement difficulty region on the image ofthe measuring object S displayed on the display section 400 is updatedfollowing the change in the posture of the measuring object S. In theposture of the measuring object S of FIG. 73B, the points P2, P3 are notincluded in the measurement difficulty region. However, the point P1 isincluded in the measurement difficulty region.

The user can further adjust the posture of the measuring object S byfurther operating the stage operation unit 145. FIG. 74A is a viewshowing a state in which the stage 140 of FIG. 73A is further rotated 45degrees in the θ direction. As shown in FIG. 74A, the posture of themeasuring object S on the stage 140 changes when the stage 140 isrotated.

As shown in FIG. 74B, the measurement difficulty region on the image ofthe measuring object S displayed on the display section 400 is updatedfollowing the change in the posture of the measuring object S. In theposture of the measuring object S of FIG. 74B, the points P1 to P3 arenot included in the measurement difficulty region. The user thus canadjust the posture of the measuring object S so that the points P1 to P3are not included in the measurement difficulty region by irradiating themeasuring object S with the adjustment light from both light projectingunits 110A, 110B.

(4) Procedure for Posture Adjustment Based on First Auxiliary Functionof Posture Adjustment

FIGS. 75 and 76 are flowcharts showing the procedure for the postureadjustment based on the first auxiliary function of the postureadjustment. The procedure for the posture adjustment based on the firstauxiliary function of the posture adjustment will be described withreference to FIGS. 1, 2, 75, and 76. The CPU 210 determines whether ornot the irradiation of the adjustment light is instructed by the user(step S61). The user can instruct the irradiation of the adjustmentlight to the CPU 210 in step S22 of FIG. 27 in the second adjustment,for example.

If the irradiation of the adjustment light is not instructed in stepS61, the CPU 210 waits until the irradiation of the adjustment light isinstructed. If the irradiation of the adjustment light is instructed instep S61, the CPU 210 irradiates the measuring object S with theadjustment light from the light projecting unit 110 (step S62). The CPU210 can irradiate the measuring object S with the adjustment light fromone or both light projecting units 110A, 110B based on the instructionof the user.

The CPU 210 then displays an image of the measuring object S irradiatedwith the adjustment light on the display section 400 (step S63). The CPU210 determines whether or not the estimation of the measurementdifficulty region is instructed by the user in this state (step S64). Ifthe estimation of the measurement difficulty region is not instructed instep S64, the CPU 210 proceeds to the processing of step S67.

If the estimation of the measurement difficulty region is instructed instep S64, the CPU 210 estimates the measurement difficulty region (stepS65). The CPU 210 also superimposes the estimated measurement difficultyregion on the image of the measuring object S and displays the same onthe display section 400 (step S66).

Thereafter, the CPU 210 determines whether or not the posture of themeasuring object S is appropriate based on the instruction of the user(step S67). The user can instruct the CPU 210 whether or not the postureof the measuring object S is appropriate.

If the posture of the measuring object S is not appropriate in step S67,the CPU 210 accepts the adjustment of the posture of the measuringobject S by the user (step S68). Meanwhile, the user can adjust theposture of the measuring object S. The CPU 210 then returns to step S67.If the posture of the measuring object S is appropriate in step S67, theuser instructs the CPU 210 that the posture of the measuring object S isappropriate. The procedure for the posture adjustment based on the firstauxiliary function of the posture adjustment is thereby terminated.

If not instructing the estimation of the measurement difficulty regionin step S64, the user determines the measurement difficulty region basedon the region where the shade is formed, the region where the loweringof the contrast of the pattern occurs due to multiple reflection, andthe region where the interval of the pattern is close in the measuringobject S. The posture of the measuring object S is inappropriate if themeasurement position of the measuring object S is in the determinedmeasurement difficulty region, and the posture of the measuring object Sis appropriate if the measurement position of the measuring object S isnot in the determined measurement difficulty region. The user thereafterinstructs the CPU 210 whether or not the posture of the measuring objectS is appropriate in step S67.

If the user instructs the estimation of the measurement difficultyregion in step S64, the measurement difficulty region is displayed onthe display section 400 in step S66. The posture of the measuring objectS is inappropriate if the measurement position of the measuring object Sis in the displayed measurement difficulty region, and the posture ofthe measuring object S is appropriate if the measurement position of themeasuring object S is not in the estimated measurement difficultyregion. The user thereafter instructs the CPU 210 whether or not theposture of the measuring object S is appropriate in step S67.

In step S67, the CPU 210 determines whether or not the posture of themeasuring object S is appropriate based on the instruction of the user,but the present invention is not limited thereto. If an ROI (Region OfInterest) is set by the user in advance, the CPU 210 may determinewhether or not the posture of the measuring object S is appropriatebased on the ROI.

FIGS. 77A and 77B are views showing an example of a display of thedisplay section 400 in which the ROI is set. The user can operate theoperation unit 250 of the PC 200 of FIG. 1 to set a measurement positionspecifying frame MF that indicates the measurement position as the ROIon the screen of the display section 400, as shown in FIGS. 77A and 77B.If the estimation of the measurement difficulty region is instructed instep S64, the measurement difficulty region UR is displayed on thedisplay section 400 in step S66.

In the example of FIG. 77A, the measurement position specifying frame MFis not overlapped with the measurement difficulty region UR. In thiscase, the CPU 210 determines that the posture of the measuring object Sis appropriate in step S67. In the example of FIG. 77B, the measurementposition specifying frame MF is overlapped with the measurementdifficulty region UR. In this case, the CPU 210 determines that theposture of the measuring object S is not appropriate in step S67. Ifdetermined that the posture of the measuring object S is notappropriate, the CPU 210 may drive the stage drive unit 146 of FIG. 1 toadjust the posture of the measuring object S so that the posture of themeasuring object S becomes appropriate automatically without dependingon the user in step S68.

(5) Effects

In the shape measuring device 500 according to the present embodiment,the measuring object S is irradiated with the adjustment light from thelight projecting unit 110 before the shape measurement. The pattern ofthe adjustment light differs from the pattern of the measurement lightwith which the measuring object S is irradiated in the shape measurementprocessing. The image of the measuring object S displayed on the displaysection 400 is displayed together with the pattern of the adjustmentlight. The user thus can easily recognize the measurement difficultyregion such as the portion where the shade is formed, the portion wherethe multiple reflection of the light occurs, or the like. If theposition to be measured of the measuring object S is included in themeasurement difficulty region, the user can easily adjust the posture ofthe measuring object S to a state appropriate for the shape measurementbefore the shape measurement processing of the measuring object S.

In the shape measuring device 500 according to the present embodiment,the measuring object S is irradiated with the adjustment light for everypredetermined time, and the measurement difficulty region issequentially estimated for every predetermined time based on theadjustment light with which the measuring object S is irradiated. Themeasurement difficulty region on the image of the measuring object Sdisplayed on the display section 400 is sequentially updated.

Thus, when the user operates the stage operation unit 145 to adjust theposture of the measuring object S, the measurement difficulty regiondisplayed on the display section 400 is updated following the change inthe posture of the measuring object S. The user thus can adjust theposture of the measuring object S while checking the measurementdifficulty region displayed on the display section 400. As a result, theposture of the measuring object S can be easily adjusted to a stateappropriate for the shape measurement before the shape measurementprocessing of the measuring object S.

[9] Second Auxiliary Function of Posture Adjustment

(1) Example of Second Auxiliary Function of Posture Adjustment

A second auxiliary function of the posture adjustment different from thefirst auxiliary function of the posture adjustment will be describedbelow. When the shape measurement processing of FIGS. 30 to 32 isexecuted in a state where the second auxiliary function of the postureadjustment is executed, the CPU 210 of FIG. 1 generates the mainstereoscopic shape data and determines the measurement difficulty regionbased on the main stereoscopic shape data. In this case, the regionwhere the main stereoscopic shape data indicating the height of themeasuring object S is not generated is determined as the measurementdifficulty region in the shape measurement processing. The region wherethe change in the generated main stereoscopic shape data is assumed asthe change in the main stereoscopic shape data obtained by multiplereflection is determined as the measurement difficulty region. Thedetermined measurement difficulty region is superimposed and displayedon the image of the measuring object S.

FIGS. 78A and 78B are views showing an example of an image of themeasuring object S including the measurement difficulty region. FIG. 78Ashows an image of the measuring object S captured by the light receivingunit 120 of FIG. 1 in a state of being irradiated with the measurementlight from the one light projecting unit 110A of FIG. 2. As shown inFIG. 78A, shade is formed at a part of the measuring object S. However,the formation of shade at a part of the measuring object S is a naturalphenomenon, and the user may not notice even if the shade is formed.

FIG. 78B shows the measurement difficulty region of the measuring objectS determined in the second auxiliary function of the posture adjustmentwith respect to the measuring object S of FIG. 78A. As shown in FIG.78B, the estimated measurement difficulty region is superimposed anddisplayed on the image of the measuring object S. In the example of FIG.78B, the measurement difficulty region is highlighted with the hatchingpattern. The user thus can reliably recognize the measurement difficultyregion.

FIGS. 79A and 79B are views showing another example of the image of themeasuring object S including the measurement difficulty region. FIG. 79Ashows the image of the measuring object S captured by the lightreceiving unit 120 of FIG. 1 in a state of being irradiated with theillumination light from the illumination light output unit 130 ofFIG. 1. As shown in FIG. 79A, shade is hardly formed on the measuringobject S depending on the illumination light from the illumination lightoutput unit 130. Therefore, the user cannot recognize the measurementdifficulty region.

FIG. 79B shows the measurement difficulty region of the measuring objectS determined in the second auxiliary function of the posture adjustmentwith respect to the measuring object S of FIG. 79A. As shown in FIG.79B, the estimated measurement difficulty region may be superimposed anddisplayed on the image of the measuring object S captured using theillumination light. In the example of FIG. 79B, the measurementdifficulty region is highlighted with the hatching pattern.

FIGS. 80A and 80B are views showing another further example of the imageof the measuring object S including the measurement difficulty region.FIG. 80A shows the image of the measuring object S captured by the lightreceiving unit 120 of FIG. 1 in a state of being irradiated with themeasurement light from both light projecting units 110A, 110B of FIG. 2.As shown in FIG. 80A, when the measuring object S is irradiated with themeasurement light from both light projecting units 110A, 110B, the shadeSs that is formed is reduced as compared the case where the measuringobject S is irradiated with the measurement light from the one lightprojecting unit 110A.

FIG. 80B shows the measurement difficulty region of the measuring objectS determined in the second auxiliary function of the posture adjustmentwith respect to the measuring object S of FIG. 80A. As shown in FIG.80B, the estimated measurement difficulty region may be superimposed anddisplayed on the image of the measuring object S captured using the onemeasurement light and the other measurement light. In the example ofFIG. 80B, the measurement difficulty region is highlighted with thehatching pattern.

FIGS. 81A and 81B are views showing another further example of the imageof the measuring object S including the measurement difficulty region.FIG. 81A shows the image of the stereoscopic shape of the measuringobject S based on the main stereoscopic shape data. FIG. 81B shows themeasurement difficulty region of the measuring object S determined inthe second auxiliary function of the posture adjustment with respect tothe measuring object S of FIG. 81A. As shown in FIG. 81B, the estimatedmeasurement difficulty region may be superimposed and displayed on theimage of the stereoscopic shape of the measuring object S. In theexample of FIG. 81B, the measurement difficulty region is highlightedwith the hatching pattern.

The defective portion of the main stereoscopic shape data generated whenthe measuring object S is irradiated with the measurement light fromboth light projecting units 110A, 110B is small compared to thedefective portion of the main stereoscopic shape data generated when themeasuring object S is irradiated with the measurement light from one ofthe light projecting units 110A, 110B. In other words, the measurementdifficulty region can be reduced by irradiating the measuring object Swith the measurement light from both light projecting units 110A, 110B,as compared to the case where the measuring object S is irradiated withthe measurement light from one of the light projecting units 110A, 110B.

The defective portion of the synthesized stereoscopic shape datagenerated when the measuring object S is irradiated with the measurementlight from both light projecting units 110A, 110B is determined, and theimage of the measuring object S is displayed on the display section 400such that the determined defective portion can be identified. The userthus can recognize the measurement difficulty region when the measuringobject S is irradiated with the measurement light from both lightprojecting units 110A, 110B. As a result, the posture of the measuringobject S can be easily and accurately adjusted to a state appropriatefor the shape measurement before carrying out the next shape measurementprocessing.

The main stereoscopic shape data may be generated for everypredetermined time. In this case, the CPU 210 sequentially determinesthe measurement difficulty region for every predetermined time based onthe generated main stereoscopic shape data. According to such aconfiguration, when the posture of the measuring object is changed, themeasurement difficulty region on the image of the measuring object Sdisplayed on the display section 400 is sequentially updated followingthe change in the posture of the measuring object S.

(2) Procedure for Posture Adjustment Based on Second Auxiliary Functionof Posture Adjustment

FIGS. 82 and 83 are flowcharts showing the procedure for the postureadjustment based on the second auxiliary function of the postureadjustment. The procedure for the posture adjustment based on the secondauxiliary function of the posture adjustment will be described withreference to FIGS. 1, 2, 82, and 83. The procedure for the postureadjustment based on the second auxiliary function of the postureadjustment is included in the shape measurement processing of FIGS. 30to 32. The processing of steps S41 to S45 is similar to the shapemeasurement processing of steps S41 to S45 of FIGS. 30 to 32.

If determined that the stereoscopic shape of the measurement position isdisplayed in step S45, the CPU 210 determines the measurement difficultyregion (step S71). The CPU 210 then superimposes the determinedmeasurement difficulty region on the image of the measuring object S,and displays the same on the display section 400 (step S72).

The image of the measuring object S displayed on the display section 400may be the image of the measuring object S captured using the onemeasurement light, or may be the image of the measuring object Scaptured using the one measurement light and the other measurementlight. Alternatively, the image of the measuring object S displayed onthe display section 400 may be the image of the measuring object Scaptured using the illumination light or may be the image of thestereoscopic shape of the measuring object S.

The CPU 210 then determines whether or not the posture of the measuringobject S is appropriate based on the instruction of the user (step S73).The user can instruct the CPU 210 whether or not the posture of themeasuring object S is appropriate.

If the posture of the measuring object S is not appropriate in step S73,the CPU 210 returns to the processing of step S41. The CPU 210 thuswaits until the start of the shape measurement processing is instructed,and the user can adjust the posture of the measuring object S so thatthe posture of the measuring object S becomes appropriate before againinstructing the start of the shape measurement processing.

If the posture of the measuring object S is appropriate in step S73, theuser instructs the CPU 210 that the posture of the measuring object S isappropriate. The CPU 210 then proceeds to the processing of step S46.The processing of steps S46 to S57 is similar to the shape measurementprocessing of steps S46 to S57 of FIGS. 30 to 32.

The CPU 210 then executes the measurement or the analysis of themeasurement position based on the instruction of the user (step S57).The shape measurement processing is then terminated. The procedure forthe posture adjustment based on the second auxiliary function of theposture adjustment is thus included in the shape measurement processingof FIGS. 30 to 32. The procedure for the posture adjustment based on thesecond auxiliary function of the posture adjustment is configured by theprocessing of steps S71 to S73.

(3) Effects

In the shape measuring device 500 according to the present embodiment,the portion of the main stereoscopic shape data corresponding to themeasurement difficulty region is determined as the defective portionsuch as the data missing portion, data inaccurate portion, or the like.The measuring object S is imaged by the light receiving unit 120, andthe image of the measuring object S is displayed on the display section400 such that the determined defective portion can be identified.

The user thus can accurately recognize the measurement difficultyregion. Therefore, the posture of the measuring object S can be easilyand accurately adjusted to a state appropriate for the shape measurementbefore carrying out the next shape measurement processing. If themeasurement position of the measuring object S is not included in themeasurement difficulty region, the user can recognize that there is noneed to perform the shape measurement processing again. Thus, if theshape of the measuring object S is simple, the shape of the measuringobject S can be measured efficiently and in a short time.

In the shape measuring device 500 according to the present embodiment,the generation of the main stereoscopic shape data is carried out forevery predetermined time, and the measurement difficulty region issequentially determined for every predetermined time based on thegenerated main stereoscopic shape data. The measurement difficultyregion on the image of the measuring object S displayed on the displaysection 400 is sequentially updated.

Thus, when the user operates the stage operation unit 145 to adjust theposture of the measuring object S, the measurement difficulty regiondisplayed on the display section 400 is updated following the change inthe posture of the measuring object S. The user thus can adjust theposture of the measuring object S while checking the measurementdifficulty region displayed on the display section 400. As a result, theposture of the measuring object S can be easily adjusted to a stateappropriate for the shape measurement before the shape measurementprocessing of the measuring object S.

[10] Third Auxiliary Function of Posture Adjustment

(1) First Example of Third Auxiliary Function of Posture Adjustment

A third auxiliary function of the posture adjustment different from thefirst or second auxiliary function of the posture adjustment will bedescribed below. The posture adjustment based on the third auxiliaryfunction of the posture adjustment is carried out between thepreparation of the shape measurement of FIG. 23 and the shapemeasurement processing of FIGS. 30 to 32.

When a first example of the third auxiliary function of the postureadjustment is executed after preparing for the shape measurement of FIG.23, the CPU 210 of FIG. 1 irradiates the measuring object S with thecoded measurement light (see FIGS. 11A to 11D) for a plurality of timesfrom the light projecting unit 110 to generate the main stereoscopicshape data. The CPU 210 also generates the main stereoscopic shape dataof the measuring object 5, and determines the measurement difficultyregion based on the main stereoscopic shape data, similarly to thesecond auxiliary function of the posture adjustment. The determinedmeasurement difficulty region is superimposed and displayed on the imageof the measuring object 5, similarly to the case of the second auxiliaryfunction of the posture adjustment.

If the posture of the measuring object S is not appropriate, the firstexample of the third auxiliary function of the posture adjustment isagain executed after the posture adjustment of the measuring object S iscarried out. If the posture of the measuring object S is appropriate,the shape measurement processing of FIGS. 30 to 32 is executed. In theshape measurement processing, the CPU 210 irradiates the measuringobject S with the striped measurement light for a plurality of times,and then with the coded measurement light for a plurality of times fromthe light projecting unit 110 to generate the main stereoscopic shapedata of the measuring object S.

Thus, the main stereoscopic shape data in the third auxiliary functionof the posture adjustment is generated to determine the measurementdifficulty region. Hereinafter, the shape measurement of the measuringobject S in the third auxiliary function of the posture adjustment isreferred to as simple measurement. The resolution of the mainstereoscopic shape data in the simple measurement may be lower than theresolution of the main stereoscopic shape data in the shape measurementprocessing.

According to the simple measurement in the first example of the thirdauxiliary function of the posture adjustment described above, theaccuracy of the main stereoscopic shape data in the simple measurementmay be lower than the accuracy of the main stereoscopic shape data inthe shape measurement processing. Thus, the number of acquisitions ofthe pattern image necessary for the generation of the main stereoscopicshape data is reduced and the processing time of the CPU 210 is reduced,whereby the defective portion of the main stereoscopic shape data in thesimple measurement can be determined in a short time. In other words,the measurement difficulty region can be determined at high speed.Therefore, the posture of the measuring object S can be appropriatelyadjusted in a short time when the shape of the measuring object S iscomplex and there is a need to repeat the posture adjustment of themeasuring object S.

As described above, the measuring object S is irradiated with only thecoded measurement light and a rough shape of the measuring object S ismeasured without irradiating the measuring object S with the stripedmeasurement light in the simple measurement, whereas the measuringobject S is sequentially irradiated with the coded measurement light andthe striped measurement light and the shape of the measuring object S isaccurately measured in the shape measurement processing.

The number of emissions N of the coded measurement light in the simplemeasurement may be set to be smaller than the number of emissions N ofthe coded measurement light in the shape measurement processing. Forexample, N may be set to 5 in the simple measurement, and N may be setto 8 in the shape measurement processing. In this case, the number ofacquisitions of the pattern image is further reduced and the processingtime of the CPU 210 is further reduced, whereby the defective portion ofthe main stereoscopic shape data in the simple measurement can bedetermined in a shorter time.

(2) Second Example of Third Auxiliary Function of Posture Adjustment

When a second example of the third auxiliary function of the postureadjustment is executed after preparing for the shape measurement of FIG.23, the CPU 210 of FIG. 1 irradiates the measuring object S with themeasurement light, in which a plurality of types of measurement lightare combined, from the light projecting unit 110 to generate the mainstereoscopic shape data of the measuring object S. When generating themain stereoscopic shape data of the measuring object S, the CPU 210determines the measurement difficulty region based on the mainstereoscopic shape data. The determined measurement difficulty region issuperimposed and displayed on the image of the measuring object S,similarly to the case of the second auxiliary function of the postureadjustment.

If the posture of the measuring object S is not appropriate, the secondexample of the third auxiliary function of the posture adjustment isagain executed after the posture adjustment of the measuring object S iscarried out. If the posture of the measuring object S is appropriate,the shape measurement processing of FIGS. 30 to 32 is executed. In theshape measurement processing, the CPU 210 irradiates the measuringobject S with the measurement light in which plurality of types ofmeasurement light are combined from the light projecting unit 110 togenerate the main stereoscopic shape data of the measuring object S.

The measurement light in the simple measurement is set so that the mainstereoscopic shape data can be generated at higher speed than themeasurement light in the shape measurement processing. According to onesetting example, for example, the measuring object S is irradiated withthe coded measurement light (see FIGS. 11A to 11D) and is alsoirradiated with the sinusoidal measurement light (see FIGS. 8A to 8D)from the light projecting unit 110 in the simple measurement. In theshape measurement processing, on the other hand, the measuring object Sis irradiated with the coded measurement light and the stripedmeasurement light (FIGS. 9A to 9C) from the light projecting unit 110.

According to another setting example, for example, the measuring objectS is irradiated with the coded measurement light and is also irradiatedwith the striped measurement light from the light projecting unit 110 inthe simple measurement and the shape measurement processing. The widthin the X direction of each bright portion of the striped measurementlight in the simple measurement is set to be greater than the width inthe X direction of each bright portion of the striped measurement lightin the shape measurement processing. For example, the width in the Xdirection of each bright portion of the striped measurement light in thesimple measurement is 6 units, and the width in the X direction of eachdark portion of the striped measurement light is 10 units. On the otherhand, the width in the X direction of each bright portion of the stripedmeasurement light in the shape measurement processing is 3 units, andthe width in the X direction of each dark portion of the stripedmeasurement light is 13 units.

According to another further setting example, for example, the measuringobject S is irradiated with the coded measurement light and is alsoirradiated with the striped measurement light from the light projectingunit 110 in the simple measurement and the shape measurement processing.The movement distance in the X direction of the striped measurementlight in the simple measurement is set to be greater than the movementdistance in the X direction of the striped measurement light in theshape measurement processing. For example, the movement distance in theX direction of the striped measurement light in the simple measurementis 2 units. On the other hand, the movement distance in the X directionof the striped measurement light in the shape measurement processing is1 unit.

According to the simple measurement in the second example of the thirdauxiliary function of the posture adjustment described above, the numberof acquisitions of the pattern image necessary for the generation of themain stereoscopic shape data is reduced and the processing time of theCPU 210 is reduced so that the main stereoscopic shape data is generatedat high speed. The defective portion of the main stereoscopic shape datain the simple measurement thus can be determined in a short time. Inother words, the measurement difficulty region can be determined at highspeed. Therefore, the posture of the measuring object S can beappropriately adjusted in a short time when the shape of the measuringobject S is complex and there is a need to repeat the posture adjustmentof the measuring object S.

(3) Third Example of Third Auxiliary Function of Posture Adjustment

When a third example of the third auxiliary function of the postureadjustment is executed after preparing for the shape measurement of FIG.23, the CPU 210 of FIG. 1 irradiates the measuring object S with themeasurement light from the light projecting unit 110. The control board150 of FIG. 1 performs decimation of pixel data corresponding to thelight receiving signal from the light receiving unit 120.

In this case, the pixel data in the X direction may be decimated, thepixel data in the Y direction may be decimated, or the pixel data in theX direction and the Y direction may be decimated. Alternatively, thepixel data may be decimated by binning processing. The exposure time ofthe light receiving unit 120 may be shortened. The frame rate of thelight receiving unit 120 thus can be increased, and the transfer speedof the pixel data from the control board 150 to the CPU 210 can beincreased.

The CPU 210 generates the main stereoscopic shape data of the measuringobject S based on the pixel data after the decimation. The CPU 210 alsogenerates the main stereoscopic shape data and determines themeasurement difficulty region based on the main stereoscopic shape data.The determined measurement difficulty region is superimposed anddisplayed on the image of the measuring object S, similarly to the caseof the second auxiliary function of the posture adjustment.

If the posture of the measuring object S is not appropriate, the thirdexample of the third auxiliary function of the posture adjustment isagain executed after the posture adjustment of the measuring object S iscarried out. If the posture of the measuring object S is appropriate,the shape measurement processing of FIGS. 30 to 32 is executed. In theshape measurement processing, the CPU 210 irradiates the measuringobject S with the measurement light from the light projecting unit 110to generate the main stereoscopic shape data of the measuring object S.

According to the simple measurement in the third example of the thirdauxiliary function of the posture adjustment described above, theaccuracy of the main stereoscopic shape data in the simple measurementmay be lower than the accuracy of the main stereoscopic shape data inthe shape measurement processing. The pixel data is thus transferred athigh speed, whereby the CPU 210 can generate the main stereoscopic shapedata at high speed. The processing time of the CPU 210 is also reduced.The defective portion of the main stereoscopic shape data in the simplemeasurement thus can be determined in a short time. In other words, themeasurement difficulty region can be determined at high speed.Therefore, the posture of the measuring object S can be appropriatelyadjusted in a short time when the shape of the measuring object S iscomplex and there is a need to repeat the posture adjustment of themeasuring object S.

(4) Fourth Example of Third Auxiliary Function of Posture Adjustment

In a fourth example of the third auxiliary function of the postureadjustment, the ROI is set in advance by the user, as shown in theexample of FIGS. 77A and 77B. When the fourth example of the thirdauxiliary function of the posture adjustment is executed after preparingfor the shape measurement of FIG. 23, the CPU 210 of FIG. 1 irradiatesthe measuring object S corresponding to at least the region in which theROI is set with the measurement light from the light projecting unit110. The control board 150 of FIG. 1 transfers the pixel datacorresponding to the light receiving signal from the light receivingunit 120 to the CPU 210.

In this case, the pixel data to be transferred is reduced as compared tothe case of irradiating all the portions of the measuring object S withthe measurement light and acquiring the images of all the portions. Theframe rate of the light receiving unit 120 thus can be increased, andthe transfer speed of the pixel data from the control board 150 to theCPU 210 can be enhanced. As a result, the main stereoscopic shape datacan be generated at high speed.

The CPU 210 generates the main stereoscopic shape data of the measuringobject S based on the pixel data, and determines the measurementdifficulty region based on the main stereoscopic shape data. Thedetermined measurement difficulty region is superimposed and displayedon the image of the measuring object S, similarly to the case of thesecond auxiliary function of the posture adjustment.

If the posture of the measuring object S is not appropriate, the fourthexample of the third auxiliary function of the posture adjustment isagain executed after the posture adjustment of the measuring object S iscarried out. If the posture of the measuring object S is appropriate,the shape measurement processing of FIGS. 30 to 32 is executed. In theshape measurement processing, the CPU 210 irradiates the measuringobject S with the measurement light from the light projecting unit 110to generate the main stereoscopic shape data of the measuring object S.

According to the simple measurement in the fourth example of the thirdauxiliary function of the posture adjustment described above, the amountof data of the main stereoscopic shape data in the simple measurementmay be smaller than the amount of data of the main stereoscopic shapedata in the shape measurement processing. The frame rate of the lightreceiving unit 120 is thus enhanced and the processing time of the CPU210 is reduced. Since the main stereoscopic shape data is generated athigh speed, whether or not the portion of the measuring object Scorresponding to the specified position of the main stereoscopic shapedata in the simple measurement includes the defective portion can bedetermined in a short time. In other words, the measurement difficultyregion can be determined at high speed. Therefore, the posture of themeasuring object S can be appropriately adjusted in a short time whenthe shape of the measuring object S is complex and there is a need torepeat the posture adjustment of the measuring object S.

The first to fourth examples of the third auxiliary function of theposture adjustment may be executed in combination. In this case, themain stereoscopic shape data is generated at higher speed, and thus themeasurement difficulty region can be determined at a higher speed. As aresult, the posture of the measuring object S can be appropriatelyadjusted in a shorter time.

The generation of the main stereoscopic shape data in the simplemeasurement may be carried out for every predetermined time. In thiscase, the CPU 210 sequentially determines the measurement difficultyregion for every predetermined time based on the generated mainstereoscopic shape data. According to such a configuration, when theposture of the measuring object is changed, the measurement difficultyregion on the image of the measuring object S displayed on the displaysection 400 is sequentially updated following the change in the postureof the measuring object S.

(5) Procedure for Posture Adjustment Based on Third Auxiliary Functionof Posture Adjustment

The posture adjustment based on the third auxiliary function of theposture adjustment is executed after preparing for the shape measurementof FIG. 23. FIG. 84 is a flowchart showing the procedure for the postureadjustment based on the third auxiliary function of the postureadjustment. The procedure for the posture adjustment based on the thirdauxiliary function of the posture adjustment will be described withreference to FIGS. 1, 2, and 84. The user instructs the start of thesimple measurement to the CPU 210 after the preparation of the shapemeasurement is finished. The CPU 210 determines whether or not the startof the simple measurement is instructed by the user (step S81).

If the start of the simple measurement is not instructed in step S81,the CPU 210 waits until the start of the simple measurement isinstructed. The user can prepare for the shape measurement beforeinstructing the start of the simple measurement. If the start of thesimple measurement is instructed in step S81, the CPU 210 irradiates themeasuring object S with the measurement light from the light projectingunit 110 and acquires the pattern image of the measuring object S (stepS82). As described above, the acquisition of the pattern image in thesimple measurement is carried out at higher speed than the acquisitionof the pattern image in the shape measurement processing performedafterward. The acquired pattern image is stored in the working memory230.

The CPU 210 processes the acquired pattern image with a predeterminedmeasurement algorithm to generate the main stereoscopic shape dataindicating the stereoscopic shape of the measuring object S (step S83).The generated main stereoscopic shape data is stored in the workingmemory 230. The CPU 210 determines the measurement difficulty region(step S84), and displays the determined measurement difficulty region onthe display section 400 by superimposing on the image of the measuringobject S (step S85).

The CPU 210 then determines whether or not the posture of the measuringobject S is appropriate based on the instruction of the user (step S86).The user can instruct the CPU 210 whether or not the posture of themeasuring object S is appropriate.

If the posture of the measuring object S is not appropriate in step S86,the CPU 210 returns to the processing of step S81. The CPU 210 thenwaits until the start of the simple measurement is instructed, and theuser can adjust the posture of the measuring object S so that theposture of the measuring object S becomes appropriate before againinstructing the start of the simple measurement.

If the posture of the measuring object S is appropriate in step S86, theuser instructs the CPU 210 that the posture of the measuring object S isappropriate. The CPU 210 then terminates the procedure for the postureadjustment based on the third auxiliary function of the postureadjustment. The CPU 210 then executes the shape measurement processingof FIGS. 30 to 32.

Thus, the posture of the measuring object S can be reliably adjustedafter the defective portion of the main stereoscopic shape data in thesimple measurement is determined by the CPU 210 and before the measuringobject S is irradiated with the measurement light by the lightprojecting unit 110. The posture of the measuring object S thus can beeasily adjusted to a state appropriate for the shape measurement beforecarrying out the shape measurement processing of the measuring object S.

In the simple measurement, the measuring object S may be irradiated withthe measurement light from both light projecting units 110A, 110B. Inthis case, the measurement difficulty region can be reduced as comparedto the case where the measuring object S is irradiated with themeasurement light from one of the light projecting units 110A, 110B.

The defective portion of the synthesized stereoscopic shape datagenerated when the measuring object S is irradiated with the measurementlight from both light projecting units 110A, 110B is determined, and theimage of the measuring object S is displayed on the display section 400so that the determined defective portion can be identified. The userthus can recognize the measurement difficulty region when the measuringobject S is irradiated with the measurement light from both lightprojecting units 110A, 110B. As a result, the posture of the measuringobject S can be easily and accurately adjusted to a state appropriatefor the shape measurement before carrying out the shape measurementprocessing.

(6) Effects

In the shape measuring device 500 according to the present embodiment,the defective portion of the main stereoscopic shape data is determinedby the simple measurement before carrying out the shape measurementprocessing. The main stereoscopic shape data in the simple measurementhas lower accuracy or smaller amount of data than the main stereoscopicshape data in the shape measurement processing. Therefore, thedetermination of the defective portion can be carried out in a shorttime. The image of the measuring object S is displayed on the displaysection 400 such that the defective portion can be identified. The userthus can easily recognize the measurement difficulty portion.

If the measurement position of the measuring object S is included in themeasurement difficulty portion, the user can easily adjust the postureof the measuring object S to a state appropriate for the shapemeasurement before carrying out the shape measurement processing of themeasuring object S. In the shape measurement processing, the mainstereoscopic shape data having higher accuracy or larger amount of datathan the main stereoscopic shape data in the simple measurement isgenerated. The shape of the measuring object S thus can be measured athigh accuracy.

In the shape measuring device 500 according to the present embodiment,the generation of the main stereoscopic shape data in the simplemeasurement is carried out for every predetermined time, and themeasurement difficulty region is sequentially determined for everypredetermined time based on the generated main stereoscopic shape data.The measurement difficulty region on the image of the measuring object Sdisplayed on the display section 400 is sequentially updated. Since thegeneration of the main stereoscopic shape data in the simple measurementis carried out at higher speed than the generation of the mainstereoscopic shape data in the shape measurement processing, themeasurement difficulty region can be updated at a shorter interval.

Thus, when the user operates the stage operation unit 145 to adjust theposture of the measuring object S, the measurement difficulty regiondisplayed on the display section 400 is updated at a shorter intervalfollowing the change in the posture of the measuring object S. The userthus can adjust the posture of the measuring object S in a short timewhile checking the measurement difficulty region displayed on thedisplay section 400. As a result, the posture of the measuring object Scan be easily adjusted in a short time to a state appropriate for theshape measurement before the shape measurement processing of themeasuring object S.

[11] Correspondence Relationship Between Each Constituent Element of theClaims and Each Portion of the Embodiment

An example of correspondence of each constituent element of the claimsand each portion of the embodiment will be hereinafter described, butthe present invention is not limited to the following example.

The measuring object S serves as a measuring object, the stage 140serves as a stage, the light projecting unit 110 serves as a lightprojecting unit or a first light projecting unit, and the lightprojecting unit 110 or the illumination light source 320 (illuminationlight output unit 130) serves as a second light projecting unit. Themeasurement light source 111 serves as a measurement light source, thepattern generating portion 112 serves as a pattern generating portion,the light receiving unit 120 serves as a light receiving unit, and theCPU 210 serves as first and second data generating units, a synthesizingunit, a determination unit, and a processing device. The stage driveunit 146 serves as a relative distance changing unit, the displaysection 400 serves as a display section, the operation unit 250 servesas an operation unit, and the shape measuring device 500 serves as ashape measuring device. The measurement light serves as first light, theillumination light serves as second light, the main stereoscopic shapedata serves as first stereoscopic shape data, the sub-stereoscopic shapedata serves as second stereoscopic shape data, the texture image dataserves as state data, and the angle α serves as a first angle.

Various other elements having the configuration or the functiondescribed in the claims may be used for the constituent elements of theclaims.

The present invention can be effectively used in the various shapemeasuring devices, shape measuring methods, and shape measuringprograms.

What is claimed is:
 1. A shape measuring device comprising: a stage onwhich a measuring object is mounted; a light projecting unit configuredto irradiate the measuring object mounted on the stage with first lightfor shape measurement obliquely from above and irradiate the measuringobject mounted on the stage with second light for surface state imagingfrom above or obliquely from above; a light receiving unit arrangedabove the stage and configured to receive the first light and the secondlight reflected by the measuring object mounted on the stage and outputa light receiving signal indicating a light receiving amount; a firstdata generating unit configured to generate first stereoscopic shapedata indicating a stereoscopic shape of the measuring object by atriangular distance measuring method based on the light receiving signalcorresponding to the first light output by the light receiving unit; arelative distance changing unit for changing a focus position of thelight receiving unit by changing a relative distance between the lightreceiving unit and the stage in an optical axis direction of the lightreceiving unit; a second data generating unit for generating a pluralityof pieces of data based on a plurality of light receiving signalscorresponding to the second light output by the light receiving unitwhile changing the focus position by the relative distance changingunit, and generating state data indicating a surface state of themeasuring object by extracting and synthesizing a plurality of dataportions obtained while focusing on each of a plurality of portions ofthe measuring object from the plurality of pieces of generated data; asynthesizing unit for generating synthesized data indicating an image inwhich the stereoscopic shape and the surface state of the measuringobject are synthesized by synthesizing the first stereoscopic shape datagenerated by the first data generating unit and the state data generatedby the second data generating unit; and a display section for displayingan image in which the stereoscopic shape and the surface state of themeasuring object are synthesized based on the synthesized data generatedby the synthesizing unit.
 2. The shape measuring device according toclaim 1, wherein the light projecting unit includes a first lightprojecting unit configured to irradiate the measuring object with thefirst light, and a second light projecting unit configured to irradiatethe measuring object with the second light, the first light projectingunit includes a measurement light source for emitting light, and apattern generating portion for generating the first light by convertingthe light emitted from the measurement light source to light having apattern for shape measurement, the first light projecting unit beingarranged to emit the first light in a direction tilted by a first angle,which is greater than 0 degrees and smaller than 90 degrees with respectto an optical axis of the light receiving unit, and the second lightprojecting unit is arranged to emit the second light having a uniformlight amount distribution in a direction parallel to the optical axis ofthe light receiving unit or in a direction tilted by a second angle,which is smaller than the first angle, with respect to the optical axisof the light receiving unit.
 3. The shape measuring device according toclaim 1, wherein the light projecting unit includes a measurement lightsource for emitting light, and a pattern generating portion configuredto generate the first light by converting the light emitted from themeasurement light source to light having a pattern for shapemeasurement, and to generate the second light by converting the lightemitted from the measurement light source to light having a uniformlight amount distribution.
 4. The shape measuring device according toclaim 1, further comprising: an operation unit for individually settinga first light amount condition defined by adjusting an intensity of thefirst light irradiated from the light projecting unit or an exposuretime of the light receiving unit when receiving the first lightreflected by the measuring object, and a second light amount conditiondefined by adjusting an intensity of the second light or an exposuretime of the light receiving unit when receiving the second lightreflected by the measuring object, and for receiving an instruction ofthe shape measurement from a user, wherein when receiving theinstruction of the shape measurement from the user by the operationunit, the first data generating unit generates the first stereoscopicshape data of the measuring object based on the light receiving signaloutput by the light receiving unit when the measuring object isirradiated with the first light in the first light amount condition, andthe second data generating unit generates the state data of themeasuring object based on the light receiving signal output by the lightreceiving unit when the measuring object is irradiated with the secondlight in the second light amount condition.
 5. The shape measuringdevice according to claim 4, wherein the operation unit is configured tobe operable by the user to select execution of any of first and secondoperation modes, and in the first operation mode, the second datagenerating unit generates a plurality of pieces of data based on aplurality of light receiving signals corresponding to the second lightoutput by the light receiving unit with the focus position changed to aplurality of positions by the relative distance changing unit, andgenerates the state data by extracting and synthesizing a plurality ofdata portions obtained while focusing on each of a plurality of portionsof the measuring object from the plurality of pieces of generated data,and in the second operation mode, the second data generating unitgenerates single data based on the light receiving signal correspondingto the second light output by the light receiving unit with the focusposition of the light receiving unit fixed, and generates the state datafrom the single data.
 6. The shape measuring device according to claim5, wherein the operation unit is configured to be operable by the userto select execution of a third operation mode, and in the thirdoperation mode, the second data generating unit generates a plurality ofpieces of data based on a plurality of light receiving signalscorresponding to the second light output by the light receiving unitwith the exposure time of the light receiving unit or the intensity ofthe second light changed, synthesizes the plurality of pieces ofgenerated data so that a dynamic range of the light receiving unit isenlarged, and generates the state data from the synthesized data.
 7. Theshape measuring device according to claim 6, wherein the operation unitis configured to be operable by the user to select execution of a fourthoperation mode, and in the fourth operation mode, the second datagenerating unit generates a plurality of pieces of data based on aplurality of light receiving signals corresponding to the second lightoutput by the light receiving unit with the exposure time of the lightreceiving unit or the intensity of the second light changed and thefocus position changed to a plurality of positions by the relativedistance changing unit, synthesizes the plurality of pieces of generateddata so that the dynamic range of the light receiving unit is enlarged,and generates the state data by extracting and synthesizing a pluralityof data portions obtained while focusing on each of a plurality ofportions of the measuring object from the synthesized data.
 8. The shapemeasuring device according to claim 1, wherein the second datagenerating unit generates second stereoscopic shape data indicating astereoscopic shape of the measuring object based on a relative distancebetween the light receiving unit and the stage by the relative distancechanging unit, and the shape measuring device further includes adetermination unit for determining, among the plurality of portions ofthe first stereoscopic shape data generated by the first data generatingunit, a portion where deviation from the second stereoscopic shape datagenerated by the second data generating unit is greater than apredetermined threshold value.
 9. The shape measuring device accordingto claim 8, wherein the determination unit displays a stereoscopic imageof the measuring object on the display section so that the portion ofthe first stereoscopic shape data where the deviation from the secondstereoscopic shape data is greater than the predetermined thresholdvalue is identified based on the first stereoscopic shape data generatedby the first data generating unit.
 10. The shape measuring deviceaccording to claim 8, wherein the determination unit interpolates, amongthe first stereoscopic shape data, the data of the portion where thedeviation from the second stereoscopic shape data is greater than thepredetermined threshold value based on data of other portions.
 11. Theshape measuring device according to claim 8, wherein the determinationunit interpolates the data of the portion where the deviation from thesecond stereoscopic shape data is greater than the predeterminedthreshold value of the first stereoscopic shape data based on data of acorresponding portion of the second stereoscopic shape data.
 12. Theshape measuring device according to claim 8, wherein the determinationunit determines a defective portion of the first stereoscopic shapedata, and interpolates the defective portion based on data of acorresponding portion of the second stereoscopic shape data.
 13. A shapemeasuring method comprising the steps of: irradiating a measuring objectmounted on a stage with first light for shape measurement obliquely fromabove by a light projecting unit; receiving the first light reflected bythe measuring object mounted on the stage with a light receiving unit ata position above the stage, and outputting a light receiving signalindicating a light receiving amount; generating first stereoscopic shapedata indicating a stereoscopic shape of the measuring object by atriangular distance measuring method based on the output light receivingsignal corresponding to the first light; changing a focus position ofthe light receiving unit by changing a relative distance between thelight receiving unit and the stage in an optical axis direction of thelight receiving unit; irradiating the measuring object mounted on thestage with second light for surface state imaging from above orobliquely from above by the light projecting unit; receiving the secondlight reflected by the measuring object mounted on the stage with thelight receiving unit at the position above the stage, and outputting alight receiving signal indicating the light receiving amount; generatinga plurality of pieces of data based on a plurality of output lightreceiving signals corresponding to the second light while changing thefocus position; generating state data indicating a surface state of themeasuring object by extracting and synthesizing a plurality of dataportions obtained while focusing on each of a plurality of portions ofthe measuring object from the plurality of pieces of generated data;generating synthesized data utilizing a synthesizing unit indicating animage in which the stereoscopic shape and the surface state of themeasuring object are synthesized by synthesizing the generated firststereoscopic shape data and the generated state data; and displaying ona display section an image in which the stereoscopic shape and thesurface state of the measuring object are synthesized based on thegenerated synthesized data.
 14. A shape measuring non-transitory programexecutable by a processing device, the non-transitory program causingthe processing device to execute the processing of: irradiating ameasuring object mounted on a stage with first light for shapemeasurement obliquely from above by a light projecting unit; receivingthe first light reflected by the measuring object mounted on the stagewith a light receiving unit at a position above the stage, andoutputting a light receiving signal indicating a light receiving amount;generating first stereoscopic shape data indicating a stereoscopic shapeof the measuring object by a triangular distance measuring method basedon the output light receiving signal corresponding to the first light;changing a focus position of the light receiving unit by changing arelative distance between the light receiving unit and the stage in anoptical axis direction of the light receiving unit; irradiating themeasuring object mounted on the stage with second light for surfacestate imaging from above or obliquely from above by the light projectingunit; receiving the second light reflected by the measuring objectmounted on the stage with the light receiving unit at a position abovethe stage, and outputting a light receiving signal indicating the lightreceiving amount; generating a plurality of pieces of data based on aplurality of output light receiving signals corresponding to the secondlight while changing the focus position; generating state dataindicating a surface state of the measuring object by extracting andsynthesizing a plurality of data portions obtained while focusing oneach of a plurality of portions of the measuring object from theplurality of pieces of generated data; generating synthesized dataindicating an image in which the stereoscopic shape and the surfacestate of the measuring object are synthesized by synthesizing thegenerated first stereoscopic shape data and the generated state data;and displaying on a display section an image in which the stereoscopicshape and the surface state of the measuring object are synthesizedbased on the generated synthesized data.